Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
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 @@
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 @@
: 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);
}