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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 11:21:44 PDT 2016


dblaikie added a comment.

Agreed with Adrian - a unit test would be good.


================
Comment at: lib/IR/DIBuilder.cpp:125-129
@@ +124,7 @@
+  SmallPtrSet<Metadata *, 16> AlreadyImported;
+  std::remove_copy_if(AllImportedModules.begin(), AllImportedModules.end(),
+    std::back_inserter(ImportedModules),
+    [&AlreadyImported](TrackingMDNodeRef &Ref) {
+    return !AlreadyImported.insert(Ref.get()).second;
+  });
+  if (!ImportedModules.empty())
----------------
This formatting looks weird - is that what clang-format produced?


http://reviews.llvm.org/D19468





More information about the llvm-commits mailing list