[PATCH] D42254: Add optional DICompileUnit to DIBuilder and make outlined debug info use that CU

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 15:07:44 PST 2018


paquette added inline comments.


================
Comment at: lib/CodeGen/MachineOutliner.cpp:1283
+    std::unique_ptr<DIBuilder> DB = llvm::make_unique<DIBuilder>(M, true, CU);
+    DIFile *Unit = DB->createFile(CU->getName(), CU->getDirectory());
+
----------------
aprantl wrote:
> aprantl wrote:
> > Can you also grab the file from the DISubprogram that you got the CU from?
> Looks like this one was accidentally marked as done?
It's CU->getFile() on here now but in the e-mail thread, it appears to still be 

DIFile *Unit = DB->createFile(CU->getName(), CU->getDirectory())

Maybe that got mixed up somehow? Or is that still incorrect? Is it possible for a DISubprogram to have a different DIFile than its CU?


https://reviews.llvm.org/D42254





More information about the llvm-commits mailing list