[PATCH] D18808: Use the NoDebug emission kind to identify compile units that no debug info should be created from.

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 22:17:51 PDT 2016


echristo added inline comments.

================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:477-479
@@ -476,2 +476,5 @@
+  unsigned DebugCUs = 0;
   for (MDNode *N : CU_Nodes->operands()) {
     auto *CUNode = cast<DICompileUnit>(N);
+    if (CUNode->getEmissionKind() == DICompileUnit::NoDebug)
+      continue;
----------------
Instead of this pattern would it make more sense to have an iterator over the nodes that checks for !NoDebug?

================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1127-1128
@@ -1115,3 +1126,4 @@
   if (!MMI->hasDebugInfo() || LScopes.empty() ||
-      !MF->getFunction()->getSubprogram()) {
+      !MF->getFunction()->getSubprogram() ||
+      !SPMap.lookup(MF->getFunction()->getSubprogram())) {
     // If we don't have a lexical scope for this function then there will
----------------
Comment.


Repository:
  rL LLVM

http://reviews.llvm.org/D18808





More information about the llvm-commits mailing list