mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
MapValue doesn't needs its LLVMContext argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -20,7 +20,6 @@
|
||||
#include "llvm/IntrinsicInst.h"
|
||||
#include "llvm/GlobalVariable.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/LLVMContext.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Transforms/Utils/ValueMapper.h"
|
||||
@ -329,8 +328,7 @@ ConstantFoldMappedInstruction(const Instruction *I) {
|
||||
SmallVector<Constant*, 8> Ops;
|
||||
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
|
||||
if (Constant *Op = dyn_cast_or_null<Constant>(MapValue(I->getOperand(i),
|
||||
ValueMap,
|
||||
Context)))
|
||||
ValueMap)))
|
||||
Ops.push_back(Op);
|
||||
else
|
||||
return 0; // All operands not constant!
|
||||
@ -366,7 +364,6 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
|
||||
ClonedCodeInfo *CodeInfo,
|
||||
const TargetData *TD) {
|
||||
assert(NameSuffix && "NameSuffix cannot be null!");
|
||||
LLVMContext &Context = OldFunc->getContext();
|
||||
|
||||
#ifndef NDEBUG
|
||||
for (Function::const_arg_iterator II = OldFunc->arg_begin(),
|
||||
@ -437,7 +434,7 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc,
|
||||
if (BasicBlock *MappedBlock =
|
||||
cast_or_null<BasicBlock>(ValueMap[PN->getIncomingBlock(pred)])) {
|
||||
Value *InVal = MapValue(PN->getIncomingValue(pred),
|
||||
ValueMap, Context);
|
||||
ValueMap);
|
||||
assert(InVal && "Unknown input value?");
|
||||
PN->setIncomingValue(pred, InVal);
|
||||
PN->setIncomingBlock(pred, MappedBlock);
|
||||
|
Reference in New Issue
Block a user