mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 20:26:07 +00:00
Change this llvm_unreachable to report_fatal_error, since it can
be triggered by valid, if dubious, IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110240 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1268,10 +1268,17 @@ static const MCExpr *LowerConstant(const Constant *CV, AsmPrinter &AP) {
|
|||||||
ConstantFoldConstantExpression(CE, AP.TM.getTargetData()))
|
ConstantFoldConstantExpression(CE, AP.TM.getTargetData()))
|
||||||
if (C != CE)
|
if (C != CE)
|
||||||
return LowerConstant(C, AP);
|
return LowerConstant(C, AP);
|
||||||
#ifndef NDEBUG
|
|
||||||
CE->dump();
|
// Otherwise report the problem to the user.
|
||||||
#endif
|
{
|
||||||
llvm_unreachable("FIXME: Don't support this constant expr");
|
std::string S;
|
||||||
|
raw_string_ostream OS(S);
|
||||||
|
OS << "Unsupported expression in static initializer: ";
|
||||||
|
WriteAsOperand(OS, CE, /*PrintType=*/false,
|
||||||
|
!AP.MF ? 0 : AP.MF->getFunction()->getParent());
|
||||||
|
report_fatal_error(OS.str());
|
||||||
|
}
|
||||||
|
return MCConstantExpr::Create(0, Ctx);
|
||||||
case Instruction::GetElementPtr: {
|
case Instruction::GetElementPtr: {
|
||||||
const TargetData &TD = *AP.TM.getTargetData();
|
const TargetData &TD = *AP.TM.getTargetData();
|
||||||
// Generate a symbolic expression for the byte address
|
// Generate a symbolic expression for the byte address
|
||||||
|
Reference in New Issue
Block a user