yonghong-song added a comment. Sure. Let me provide a little bit more context and what I want to achieve:
. I have a tool, called bcc (https://github.com/iovisor/bcc) which uses clang CompilerInvocation interface and MCJIT to generates BPF code and load into kernel . Several files (the main.c and a few others headers) are clang memory mapped. . The particular fix here is related to https://reviews.llvm.org/D53261, getting source code into BTF, but before that, based on that particular implementation, the source code needs to be in IR. What I found is that for the memory mapped /virtual/main.c file, there is one DIFile entry in generated IR, the associated 'source' is empty, which actually caused a seg fault later. Not that this bug itself does not need https://reviews.llvm.org/D53261. So without this fix, bcc tool will seg fault. With this fix, bcc tool works properly and all DIFile entry has proper source codes embedded, which if coupled with IR->BTF or Dwarf->BTF should generate correct BTF debug info. Repository: rC Clang https://reviews.llvm.org/D53329 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits