aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/EdgeProfiling.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-06 18:42:36 +0000
committerOwen Anderson <resistor@mac.com>2009-07-06 18:42:36 +0000
commit508955156a25a9abc470a29e1760aa176d341cf9 (patch)
tree8b7b55caabc0fbb16b6025f38e84ebc4fbd79c31 /lib/Transforms/Instrumentation/EdgeProfiling.cpp
parente034393b15bc9257314b0c7adfb778e0c504bed7 (diff)
Thread LLVMContext through the constant folding APIs, which touches a lot of files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74844 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/EdgeProfiling.cpp')
-rw-r--r--lib/Transforms/Instrumentation/EdgeProfiling.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/EdgeProfiling.cpp b/lib/Transforms/Instrumentation/EdgeProfiling.cpp
index 0831f3b7a4..88825b164c 100644
--- a/lib/Transforms/Instrumentation/EdgeProfiling.cpp
+++ b/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;