diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-08 19:03:57 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-08 19:03:57 +0000 |
| commit | b17f32945fa6dd8e552a16cc5273bba5805cf4e4 (patch) | |
| tree | b8383165ab804187660d5c8eddb2dc7486730b93 /llvm/lib/Transforms/Instrumentation/RSProfiling.cpp | |
| parent | d5ffa8ffb62df34c6fa3ba8ec4c29b2ea2891ad0 (diff) | |
| download | bcm5719-llvm-b17f32945fa6dd8e552a16cc5273bba5805cf4e4.tar.gz bcm5719-llvm-b17f32945fa6dd8e552a16cc5273bba5805cf4e4.zip | |
Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
llvm-svn: 75025
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/RSProfiling.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/RSProfiling.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp index 0999a279ef0..51012209539 100644 --- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -198,9 +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(M.getContext(), T, false, - GlobalValue::InternalLinkage, - Init, "RandomSteeringCounter", &M); + Counter = new GlobalVariable(M, T, false, GlobalValue::InternalLinkage, + Init, "RandomSteeringCounter"); } GlobalRandomCounter::~GlobalRandomCounter() {} @@ -238,9 +237,8 @@ GlobalRandomCounterOpt::GlobalRandomCounterOpt(Module& M, const IntegerType* t, : AI(0), T(t) { ConstantInt* Init = M.getContext().getConstantInt(T, resetval); ResetValue = Init; - Counter = new GlobalVariable(M.getContext(), T, false, - GlobalValue::InternalLinkage, - Init, "RandomSteeringCounter", &M); + Counter = new GlobalVariable(M, T, false, GlobalValue::InternalLinkage, + Init, "RandomSteeringCounter"); } GlobalRandomCounterOpt::~GlobalRandomCounterOpt() {} |

