diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-06 18:42:36 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-06 18:42:36 +0000 |
commit | 39f00cc1d459f02d3a1c115b40d7560f93b22908 (patch) | |
tree | 98282993fa2ebf9ea18d22abf5f59320cc4cfb50 /llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp | |
parent | 0578e4386296e7c59efe99499af6878f33ff3bb4 (diff) | |
download | bcm5719-llvm-39f00cc1d459f02d3a1c115b40d7560f93b22908.tar.gz bcm5719-llvm-39f00cc1d459f02d3a1c115b40d7560f93b22908.zip |
Thread LLVMContext through the constant folding APIs, which touches a lot of files.
llvm-svn: 74844
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp index 0831f3b7a48..88825b164cb 100644 --- a/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/EdgeProfiling.cpp @@ -20,6 +20,7 @@ #include "ProfilingUtils.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" +#include "llvm/LLVMContext.h" #include "llvm/Module.h" #include "llvm/Pass.h" #include "llvm/Support/Compiler.h" @@ -63,10 +64,10 @@ bool EdgeProfiler::runOnModule(Module &M) { NumEdges += BB->getTerminator()->getNumSuccessors(); } - const Type *ATy = ArrayType::get(Type::Int32Ty, NumEdges); + const Type *ATy = Context->getArrayType(Type::Int32Ty, NumEdges); GlobalVariable *Counters = new GlobalVariable(ATy, false, GlobalValue::InternalLinkage, - Constant::getNullValue(ATy), "EdgeProfCounters", &M); + Context->getNullValue(ATy), "EdgeProfCounters", &M); // Instrument all of the edges... unsigned i = 0; |