mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Simplify test, as suggested by Chris.
llvm-svn: 124990
This commit is contained in:
parent
61f2126479
commit
61133e38a9
@ -341,14 +341,10 @@ static bool ReadDataFromGlobal(Constant *C, uint64_t ByteOffset,
|
||||
}
|
||||
|
||||
if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) {
|
||||
if (CE->getOpcode() == Instruction::IntToPtr) {
|
||||
uint64_t PtrSize = TD.getTypeAllocSize(C->getType());
|
||||
uint64_t IntSize = TD.getTypeAllocSize(C->getOperand(0)->getType());
|
||||
|
||||
if (PtrSize == IntSize)
|
||||
if (CE->getOpcode() == Instruction::IntToPtr &&
|
||||
CE->getOperand(0)->getType() == TD.getIntPtrType(CE->getContext()))
|
||||
return ReadDataFromGlobal(CE->getOperand(0), ByteOffset, CurPtr,
|
||||
BytesLeft, TD);
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise, unknown initializer type.
|
||||
|
Loading…
x
Reference in New Issue
Block a user