[PATCH] D53329: Generate DIFile with main program if source is not available

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 14 14:59:27 PST 2018


dblaikie added a comment.

Thanks for this - though it looks like the test program hits an assertion failure (for me at least - before it gets to the interesting point.

clang-test: /usr/local/google/home/blaikie/dev/llvm/src/lib/ExecutionEngine/MCJIT/MCJIT.cpp:204: virtual void llvm::MCJIT::generateCodeForModule(llvm::Module *): Assertion `M->getDataLayout() == getDataLayout() && "DataLayout Mismatch"' failed.

Also, while this is useful for me to understand what's going on (thanks!) & it looks like might lead us to a better understanding of where the bug(s) are - this change would also need a standalone test case in clang without the need to build a new/separate binary. But I imagine this could be tested in Clang by running clang on this source file & checking the IR that clang generates? Or does clang not generate the interesting IR itself, only when invoked through some other codepath you've demonstrated in the clang-test.cpp does this come up?


Repository:
  rC Clang

https://reviews.llvm.org/D53329





More information about the cfe-commits mailing list