mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Fix some problems where the verifier would crash on invalid input instead of
reporting the problem and exiting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -755,9 +755,12 @@ std::ostream &AssemblyWriter::printTypeAtLeastOneLevel(const Type *Ty) {
|
||||
|
||||
void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType,
|
||||
bool PrintName) {
|
||||
assert(Operand != 0 && "Illegal Operand");
|
||||
if (PrintType) { Out << ' '; printType(Operand->getType()); }
|
||||
WriteAsOperandInternal(Out, Operand, PrintName, TypeNames, &Machine);
|
||||
if (Operand != 0) {
|
||||
if (PrintType) { Out << ' '; printType(Operand->getType()); }
|
||||
WriteAsOperandInternal(Out, Operand, PrintName, TypeNames, &Machine);
|
||||
} else {
|
||||
Out << "<null operand!>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user