mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Report an error for bad inline assembly, where the value passed for an
"indirect" operand is not a pointer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91913 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b1f4981333
commit
e261b0c90b
@ -5482,8 +5482,12 @@ public:
|
|||||||
|
|
||||||
// If this is an indirect operand, the operand is a pointer to the
|
// If this is an indirect operand, the operand is a pointer to the
|
||||||
// accessed type.
|
// accessed type.
|
||||||
if (isIndirect)
|
if (isIndirect) {
|
||||||
OpTy = cast<PointerType>(OpTy)->getElementType();
|
const llvm::PointerType *PtrTy = dyn_cast<PointerType>(OpTy);
|
||||||
|
if (!PtrTy)
|
||||||
|
llvm_report_error("Indirect operand for inline asm not a pointer!");
|
||||||
|
OpTy = PtrTy->getElementType();
|
||||||
|
}
|
||||||
|
|
||||||
// If OpTy is not a single value, it may be a struct/union that we
|
// If OpTy is not a single value, it may be a struct/union that we
|
||||||
// can tile with integers.
|
// can tile with integers.
|
||||||
|
Loading…
Reference in New Issue
Block a user