[PATCH] D19468: Disallow duplication of imported entities (improved implementation)

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 24 14:26:34 PDT 2016


aprantl added inline comments.

================
Comment at: lib/IR/DIBuilder.cpp:131
@@ -126,1 +130,3 @@
+  if (!ImportedModules.empty())
+    CUNode->replaceImportedEntities(MDTuple::get(VMContext, ImportedModules));
 
----------------
Maybe assert that CUNode->getImportedEntities() is empty?

================
Comment at: lib/IR/DIBuilder.cpp:178
@@ -177,3 +181,1 @@
-    // Add it to the Imported Modules list.
-    AllImportedModules.emplace_back(M);
   return M;
----------------
This is more a general question: Is there a difference between emplace_back for a *pointer* element and a regular push_back?


http://reviews.llvm.org/D19468





More information about the llvm-commits mailing list