Report an error for bad inline assembly, where the value passed for an

"indirect" operand is not a pointer.

llvm-svn: 91913
This commit is contained in:
Bob Wilson 2009-12-22 18:34:19 +00:00
parent dc72875d25
commit bac37abe73
1 changed files with 6 additions and 2 deletions

View File

@ -5482,8 +5482,12 @@ public:
// If this is an indirect operand, the operand is a pointer to the
// accessed type.
if (isIndirect)
OpTy = cast<PointerType>(OpTy)->getElementType();
if (isIndirect) {
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
// can tile with integers.