diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Instrumentation/TraceValues.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 6e4fedcfa8..72c454187b 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -87,6 +87,9 @@ bool InsertTraceCode::doInitialization(Module *M) { static inline GlobalVariable *getStringRef(Module *M, const string &str) { // Create a constant internal string reference... Constant *Init = ConstantArray::get(str); + + // Create the global variable and record it in the module + // The GV will be renamed to a unique name if needed. GlobalVariable *GV = new GlobalVariable(Init->getType(), true, true, Init, "trstr"); M->getGlobalList().push_back(GV); |