Revert "Remove DIBuilder cache of variable TheCU and change the few"
This reverts commit r186599 as I didn't want to commit this yet.
llvm-svn: 186601
diff --git a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
index 651381d..cea19e6 100644
--- a/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DebugIR.cpp
@@ -289,9 +289,9 @@
"LLVM Version " STR(LLVM_VERSION_MAJOR) "." STR(LLVM_VERSION_MINOR);
}
- CUNode =
- Builder.createCompileUnit(dwarf::DW_LANG_C99, Filename, Directory,
- Producer, IsOptimized, Flags, RuntimeVersion);
+ Builder.createCompileUnit(dwarf::DW_LANG_C99, Filename, Directory, Producer,
+ IsOptimized, Flags, RuntimeVersion);
+ CUNode = Builder.getCU();
if (CUToReplace)
CUToReplace->replaceAllUsesWith(const_cast<MDNode *>(CUNode));