diff options
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r-- | lib/Transforms/Instrumentation/BlockProfiling.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/EdgeProfiling.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Instrumentation/RSProfiling.cpp | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/lib/Transforms/Instrumentation/BlockProfiling.cpp b/lib/Transforms/Instrumentation/BlockProfiling.cpp index 913680c..6dfcc0b 100644 --- a/lib/Transforms/Instrumentation/BlockProfiling.cpp +++ b/lib/Transforms/Instrumentation/BlockProfiling.cpp @@ -65,7 +65,7 @@ bool FunctionProfiler::runOnModule(Module &M) { const Type *ATy = Context->getArrayType(Type::Int32Ty, NumFunctions); GlobalVariable *Counters = - new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, + new GlobalVariable(M.getContext(), ATy, false, GlobalValue::InternalLinkage, Context->getNullValue(ATy), "FuncProfCounters", &M); // Instrument all of the functions... @@ -110,7 +110,7 @@ bool BlockProfiler::runOnModule(Module &M) { const Type *ATy = Context->getArrayType(Type::Int32Ty, NumBlocks); GlobalVariable *Counters = - new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, + new GlobalVariable(M.getContext(), ATy, false, GlobalValue::InternalLinkage, Context->getNullValue(ATy), "BlockProfCounters", &M); // Instrument all of the blocks... diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 88825b1..b625341 100644 --- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -66,7 +66,7 @@ bool EdgeProfiler::runOnModule(Module &M) { const Type *ATy = Context->getArrayType(Type::Int32Ty, NumEdges); GlobalVariable *Counters = - new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, + new GlobalVariable(M.getContext(), ATy, false, GlobalValue::InternalLinkage, Context->getNullValue(ATy), "EdgeProfCounters", &M); // Instrument all of the edges... diff --git a/lib/Transforms/Instrumentation/RSProfiling.cpp b/lib/Transforms/Instrumentation/RSProfiling.cpp index e487d2f..0999a27 100644 --- a/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -198,7 +198,8 @@ GlobalRandomCounter::GlobalRandomCounter(Module& M, const IntegerType* t, uint64_t resetval) : T(t) { ConstantInt* Init = M.getContext().getConstantInt(T, resetval); ResetValue = Init; - Counter = new GlobalVariable(T, false, GlobalValue::InternalLinkage, + Counter = new GlobalVariable(M.getContext(), T, false, + GlobalValue::InternalLinkage, Init, "RandomSteeringCounter", &M); } @@ -237,7 +238,8 @@ GlobalRandomCounterOpt::GlobalRandomCounterOpt(Module& M, const IntegerType* t, : AI(0), T(t) { ConstantInt* Init = M.getContext().getConstantInt(T, resetval); ResetValue = Init; - Counter = new GlobalVariable(T, false, GlobalValue::InternalLinkage, + Counter = new GlobalVariable(M.getContext(), T, false, + GlobalValue::InternalLinkage, Init, "RandomSteeringCounter", &M); } |