diff options
Diffstat (limited to 'lib/Transforms/Instrumentation/RSProfiling.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/RSProfiling.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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); } |