[PATCH] D30897: [WIP] New AsmPrinterHandler that is able to interleave source code

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 14 13:17:36 PDT 2017


efriedma added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/SourceInterleave.cpp:38
+    std::unique_ptr<SourceCodeInfo> SI(new SourceCodeInfo);
+    auto ErrorMemBuffer = MemoryBuffer::getFile(FullPathname);
+    if (ErrorMemBuffer) {
----------------
If we're compiling source code using clang, we already have the source code in a buffer in memory.  Re-reading it from the disk is useless work at best, and might not even work in some cases (for example, clang supports reading C code from stdin).


https://reviews.llvm.org/D30897





More information about the llvm-commits mailing list