mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user