mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
bug 122:
- Replace ConstantPointerRef usage with GlobalValue usage git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14953 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -42,8 +42,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
|
||||
std::vector<Constant*> GEPIndices(2, Constant::getNullValue(Type::IntTy));
|
||||
unsigned NumElements = 0;
|
||||
if (Array) {
|
||||
ConstantPointerRef *ArrayCPR = ConstantPointerRef::get(Array);
|
||||
Args[2] = ConstantExpr::getGetElementPtr(ArrayCPR, GEPIndices);
|
||||
Args[2] = ConstantExpr::getGetElementPtr(Array, GEPIndices);
|
||||
NumElements =
|
||||
cast<ArrayType>(Array->getType()->getElementType())->getNumElements();
|
||||
} else {
|
||||
@@ -87,7 +86,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
|
||||
}
|
||||
|
||||
void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
|
||||
ConstantPointerRef *CounterArray) {
|
||||
GlobalValue *CounterArray) {
|
||||
// Insert the increment after any alloca or PHI instructions...
|
||||
BasicBlock::iterator InsertPos = BB->begin();
|
||||
while (isa<AllocaInst>(InsertPos) || isa<PHINode>(InsertPos))
|
||||
|
||||
Reference in New Issue
Block a user