[PATCH] D17884: Disallow duplication of imported entities

don hinton via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 5 08:18:30 PST 2016


hintonda added a comment.

It's actually a DenseSet, which makes it even easier.  Here's a partial diff -- the rest is just removing references to AllImportedModules.

diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index b7841fe..9288207 100644

- a/lib/IR/DIBuilder.cpp

+++ b/lib/IR/DIBuilder.cpp
@@ -19,6 +19,7 @@
 #include "llvm/IR/Module.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/Dwarf.h"
+#include "LLVMContextImpl.h"

using namespace llvm;
 using namespace llvm::dwarf;
@@ -110,10 +111,10 @@ void DIBuilder::finalize() {

  if (!AllGVs.empty())
    CUNode->replaceGlobalVariables(MDTuple::get(VMContext, AllGVs));

- if (!AllImportedModules.empty())

+  if (!VMContext.pImpl->DIImportedEntitys.empty())

  CUNode->replaceImportedEntities(MDTuple::get(

- VMContext, SmallVector<Metadata *, 16>(AllImportedModules.begin(),
- AllImportedModules.end())));

+        VMContext, SmallVector<Metadata *, 16>(VMContext.pImpl->DIImportedEntitys.begin(),
+                                               VMContext.pImpl->DIImportedEntitys.end())));


http://reviews.llvm.org/D17884





More information about the llvm-commits mailing list