mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Revert "[opaque pointer type] Avoid using PointerType::getElementType for a few cases of CallInst"
This reverts commit r235458. It looks like this might be breaking something LTO-ish. Looking into it & will recommit with a fix/test case/etc once I've got more to go on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235533 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -13,7 +13,6 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/Utils/ValueMapper.h"
|
||||
#include "llvm/IR/CallSite.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/InlineAsm.h"
|
||||
@ -385,16 +384,6 @@ void llvm::RemapInstruction(Instruction *I, ValueToValueMapTy &VMap,
|
||||
}
|
||||
|
||||
// If the instruction's type is being remapped, do so now.
|
||||
if (auto CS = CallSite(I)) {
|
||||
SmallVector<Type *, 3> Tys;
|
||||
FunctionType *Old = CS.getFunctionType();
|
||||
unsigned NumOld = Old->getNumParams();
|
||||
assert(NumOld <= CS.arg_size());
|
||||
for (unsigned i = 0; i != NumOld; ++i)
|
||||
Tys.push_back(CS.getArgument(i)->getType());
|
||||
CS.mutateFunctionType(FunctionType::get(
|
||||
TypeMapper ? TypeMapper->remapType(I->getType()) : I->getType(), Tys,
|
||||
Old->isVarArg()));
|
||||
} else if (TypeMapper)
|
||||
if (TypeMapper)
|
||||
I->mutateType(TypeMapper->remapType(I->getType()));
|
||||
}
|
||||
|
Reference in New Issue
Block a user