Fix a fixme and make DICompileUnit a distinct node. Tested via clang.
authorAdrian Prantl <aprantl@apple.com>
Tue, 30 Jun 2015 18:32:18 +0000 (18:32 +0000)
committerAdrian Prantl <aprantl@apple.com>
Tue, 30 Jun 2015 18:32:18 +0000 (18:32 +0000)
llvm-svn: 241097

llvm/lib/IR/DIBuilder.cpp

index 6a5383d..fcda8ae 100644 (file)
@@ -141,9 +141,7 @@ DICompileUnit *DIBuilder::createCompileUnit(
   TempGVs = MDTuple::getTemporary(VMContext, None);
   TempImportedModules = MDTuple::getTemporary(VMContext, None);
 
-  // TODO: Switch to getDistinct().  We never want to merge compile units based
-  // on contents.
-  DICompileUnit *CUNode = DICompileUnit::get(
+  DICompileUnit *CUNode = DICompileUnit::getDistinct(
       VMContext, Lang, DIFile::get(VMContext, Filename, Directory), Producer,
       isOptimized, Flags, RunTimeVer, SplitName, Kind, TempEnumTypes.get(),
       TempRetainTypes.get(), TempSubprograms.get(), TempGVs.get(),