diff options
| author | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2009-07-22 00:24:57 +0000 |
| commit | 47db941fd3e5a698c4417e38686ff6da6b2d81ee (patch) | |
| tree | f1bc8ce05f4b4c0c6f5eb775c3e5b12eda35e2f1 /llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp | |
| parent | 4565ef5b65b7d0b778b41836d70b806196cc8e24 (diff) | |
| download | bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.tar.gz bcm5719-llvm-47db941fd3e5a698c4417e38686ff6da6b2d81ee.zip | |
Get rid of the Pass+Context magic.
llvm-svn: 76702
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp index 440f59b37d7..065bd1125d2 100644 --- a/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp @@ -63,10 +63,10 @@ bool FunctionProfiler::runOnModule(Module &M) { if (!I->isDeclaration()) ++NumFunctions; - const Type *ATy = Context->getArrayType(Type::Int32Ty, NumFunctions); + const Type *ATy = M.getContext().getArrayType(Type::Int32Ty, NumFunctions); GlobalVariable *Counters = new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage, - Context->getNullValue(ATy), "FuncProfCounters"); + M.getContext().getNullValue(ATy), "FuncProfCounters"); // Instrument all of the functions... unsigned i = 0; @@ -108,10 +108,10 @@ bool BlockProfiler::runOnModule(Module &M) { for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) NumBlocks += I->size(); - const Type *ATy = Context->getArrayType(Type::Int32Ty, NumBlocks); + const Type *ATy = M.getContext().getArrayType(Type::Int32Ty, NumBlocks); GlobalVariable *Counters = new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage, - Context->getNullValue(ATy), "BlockProfCounters"); + M.getContext().getNullValue(ATy), "BlockProfCounters"); // Instrument all of the blocks... unsigned i = 0; |

