rename llvm::llvm_report_error -> llvm::report_fatal_error

llvm-svn: 100709
This commit is contained in:
Chris Lattner 2010-04-07 22:58:41 +00:00
parent 4b73cfabac
commit 2104b8d36e
52 changed files with 143 additions and 143 deletions

View File

@ -60,9 +60,9 @@ namespace llvm {
/// standard error, followed by a newline.
/// After the error handler is called this function will call exit(1), it
/// does not return.
NORETURN void llvm_report_error(const char *reason);
NORETURN void llvm_report_error(const std::string &reason);
NORETURN void llvm_report_error(const Twine &reason);
NORETURN void report_fatal_error(const char *reason);
NORETURN void report_fatal_error(const std::string &reason);
NORETURN void report_fatal_error(const Twine &reason);
/// This function calls abort(), and prints the optional message to stderr.
/// Use the llvm_unreachable macro (that adds location info), instead of

View File

@ -96,7 +96,7 @@ public:
/// clear_error - Set the flag read by has_error() to false. If the error
/// flag is set at the time when this raw_ostream's destructor is called,
/// llvm_report_error is called to report the error. Use clear_error()
/// report_fatal_error is called to report the error. Use clear_error()
/// after handling the error to avoid this behavior.
void clear_error() {
Error = false;

View File

@ -1723,7 +1723,7 @@ GCMetadataPrinter *AsmPrinter::GetOrCreateGCPrinter(GCStrategy *S) {
return GMP;
}
llvm_report_error("no GCMetadataPrinter registered for GC: " + Twine(Name));
report_fatal_error("no GCMetadataPrinter registered for GC: " + Twine(Name));
return 0;
}

View File

@ -75,7 +75,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, unsigned LocCookie) const {
AsmParser Parser(SrcMgr, OutContext, OutStreamer, *MAI);
OwningPtr<TargetAsmParser> TAP(TM.getTarget().createAsmParser(Parser));
if (!TAP)
llvm_report_error("Inline asm not supported by this streamer because"
report_fatal_error("Inline asm not supported by this streamer because"
" we don't have an asm parser for this target\n");
Parser.setTargetParser(*TAP.get());
@ -83,7 +83,7 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, unsigned LocCookie) const {
int Res = Parser.Run(/*NoInitialTextSection*/ true,
/*NoFinalize*/ true);
if (Res && !HasDiagHandler)
llvm_report_error("Error parsing inline asm\n");
report_fatal_error("Error parsing inline asm\n");
}
@ -178,7 +178,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
case '(': // $( -> same as GCC's { character.
++LastEmitted; // Consume '(' character.
if (CurVariant != -1)
llvm_report_error("Nested variants found in inline asm string: '"
report_fatal_error("Nested variants found in inline asm string: '"
+ std::string(AsmStr) + "'");
CurVariant = 0; // We're in the first variant now.
break;
@ -213,7 +213,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
const char *StrStart = LastEmitted;
const char *StrEnd = strchr(StrStart, '}');
if (StrEnd == 0)
llvm_report_error(Twine("Unterminated ${:foo} operand in inline asm"
report_fatal_error(Twine("Unterminated ${:foo} operand in inline asm"
" string: '") + Twine(AsmStr) + "'");
std::string Val(StrStart, StrEnd);
@ -228,7 +228,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
unsigned Val;
if (StringRef(IDStart, IDEnd-IDStart).getAsInteger(10, Val))
llvm_report_error("Bad $ operand number in inline asm string: '"
report_fatal_error("Bad $ operand number in inline asm string: '"
+ std::string(AsmStr) + "'");
LastEmitted = IDEnd;
@ -240,7 +240,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
if (*LastEmitted == ':') {
++LastEmitted; // Consume ':' character.
if (*LastEmitted == 0)
llvm_report_error("Bad ${:} expression in inline asm string: '" +
report_fatal_error("Bad ${:} expression in inline asm string: '" +
std::string(AsmStr) + "'");
Modifier[0] = *LastEmitted;
@ -248,13 +248,13 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
}
if (*LastEmitted != '}')
llvm_report_error("Bad ${} expression in inline asm string: '"
report_fatal_error("Bad ${} expression in inline asm string: '"
+ std::string(AsmStr) + "'");
++LastEmitted; // Consume '}' character.
}
if (Val >= NumOperands-1)
llvm_report_error("Invalid $ operand number in inline asm string: '"
report_fatal_error("Invalid $ operand number in inline asm string: '"
+ std::string(AsmStr) + "'");
// Okay, we finally have a value number. Ask the target to print this
@ -297,7 +297,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
raw_string_ostream Msg(msg);
Msg << "Invalid operand found in inline asm: '" << AsmStr << "'\n";
MI->print(Msg);
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
}
break;
@ -343,7 +343,7 @@ void AsmPrinter::PrintSpecial(const MachineInstr *MI, raw_ostream &OS,
raw_string_ostream Msg(msg);
Msg << "Unknown special formatter '" << Code
<< "' for machine instr: " << *MI;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
}

View File

@ -115,7 +115,7 @@ void OcamlGCMetadataPrinter::finishAssembly(AsmPrinter &AP) {
<< "' is too large for the ocaml GC! "
<< "Frame size " << FrameSize << " >= 65536.\n";
Msg << "(" << uintptr_t(&FI) << ")";
llvm_report_error(Msg.str()); // Very rude!
report_fatal_error(Msg.str()); // Very rude!
}
AP.OutStreamer.AddComment("live roots for " +
@ -130,7 +130,7 @@ void OcamlGCMetadataPrinter::finishAssembly(AsmPrinter &AP) {
Msg << "Function '" << FI.getFunction().getName()
<< "' is too large for the ocaml GC! "
<< "Live root count " << LiveCount << " >= 65536.";
llvm_report_error(Msg.str()); // Very rude!
report_fatal_error(Msg.str()); // Very rude!
}
AP.OutStreamer.EmitSymbolValue(J->Label, IntPtrSize, 0);

View File

@ -507,7 +507,7 @@ void ELFWriter::EmitGlobalConstant(const Constant *CV, ELFSection &GblS) {
std::string msg;
raw_string_ostream ErrorMsg(msg);
ErrorMsg << "Constant unimp for type: " << *CV->getType();
llvm_report_error(ErrorMsg.str());
report_fatal_error(ErrorMsg.str());
}
// ResolveConstantExpr - Resolve the constant expression until it stop
@ -575,7 +575,7 @@ CstExprResTy ELFWriter::ResolveConstantExpr(const Constant *CV) {
std::string msg(CE->getOpcodeName());
raw_string_ostream ErrorMsg(msg);
ErrorMsg << ": Unsupported ConstantExpr type";
llvm_report_error(ErrorMsg.str());
report_fatal_error(ErrorMsg.str());
return std::make_pair(CV, 0); // silence warning
}

View File

@ -336,10 +336,10 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
switch (Callee->getIntrinsicID()) {
case Intrinsic::not_intrinsic:
llvm_report_error("Cannot lower a call to a non-intrinsic function '"+
report_fatal_error("Cannot lower a call to a non-intrinsic function '"+
Callee->getName() + "'!");
default:
llvm_report_error("Code generator does not support intrinsic function '"+
report_fatal_error("Code generator does not support intrinsic function '"+
Callee->getName()+"'!");
// The setjmp/longjmp intrinsics should only exist in the code if it was

View File

@ -2085,7 +2085,7 @@ bool LiveIntervals::spillPhysRegAroundRegDefsUses(const LiveInterval &li,
<< "constraints:\n";
MI->print(Msg, tm_);
}
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
for (const unsigned* AS = tri_->getSubRegisters(PReg); *AS; ++AS) {
if (!hasInterval(*AS))

View File

@ -279,7 +279,7 @@ bool MachineVerifier::runOnMachineFunction(MachineFunction &MF) {
if (OutFile)
delete OutFile;
else if (foundErrors)
llvm_report_error("Found "+Twine(foundErrors)+" machine code errors.");
report_fatal_error("Found "+Twine(foundErrors)+" machine code errors.");
// Clean up.
regsLive.clear();

View File

@ -1177,7 +1177,7 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur) {
assignRegOrStackSlotAtInterval(cur);
} else {
assert(false && "Ran out of registers during register allocation!");
llvm_report_error("Ran out of registers during register allocation!");
report_fatal_error("Ran out of registers during register allocation!");
}
return;
}

View File

@ -549,7 +549,7 @@ MachineInstr *RALocal::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
<< "constraints:\n";
MI->print(Msg, TM);
}
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
for (const unsigned *SubRegs = TRI->getSubRegisters(PhysReg);
*SubRegs; ++SubRegs) {
@ -563,7 +563,7 @@ MachineInstr *RALocal::reloadVirtReg(MachineBasicBlock &MBB, MachineInstr *MI,
<< "constraints:\n";
MI->print(Msg, TM);
}
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
return MI;

View File

@ -3082,7 +3082,7 @@ void SelectionDAGLegalize::PromoteNode(SDNode *Node,
ExtOp = ISD::ANY_EXTEND;
TruncOp = ISD::TRUNCATE;
} else {
llvm_report_error("Cannot promote logic operation");
report_fatal_error("Cannot promote logic operation");
}
// Promote each of the values to the new type.
Tmp1 = DAG.getNode(ExtOp, dl, NVT, Node->getOperand(0));

View File

@ -4993,7 +4993,7 @@ public:
if (isIndirect) {
const llvm::PointerType *PtrTy = dyn_cast<PointerType>(OpTy);
if (!PtrTy)
llvm_report_error("Indirect operand for inline asm not a pointer!");
report_fatal_error("Indirect operand for inline asm not a pointer!");
OpTy = PtrTy->getElementType();
}
@ -5331,7 +5331,7 @@ void SelectionDAGBuilder::visitInlineAsm(CallSite CS) {
Input.ConstraintVT.isInteger()) ||
(OpInfo.ConstraintVT.getSizeInBits() !=
Input.ConstraintVT.getSizeInBits())) {
llvm_report_error("Unsupported asm: input constraint"
report_fatal_error("Unsupported asm: input constraint"
" with a matching output constraint of incompatible"
" type!");
}
@ -5444,7 +5444,7 @@ void SelectionDAGBuilder::visitInlineAsm(CallSite CS) {
// Copy the output from the appropriate register. Find a register that
// we can use.
if (OpInfo.AssignedRegs.Regs.empty())
llvm_report_error("Couldn't allocate output reg for"
report_fatal_error("Couldn't allocate output reg for"
" constraint '" + OpInfo.ConstraintCode + "'!");
// If this is an indirect operand, store through the pointer after the
@ -5497,7 +5497,7 @@ void SelectionDAGBuilder::visitInlineAsm(CallSite CS) {
InlineAsm::isRegDefEarlyClobberKind(OpFlag)) {
// Add (OpFlag&0xffff)>>3 registers to MatchedRegs.
if (OpInfo.isIndirect)
llvm_report_error("Don't know how to handle tied indirect "
report_fatal_error("Don't know how to handle tied indirect "
"register inputs yet!");
RegsForValue MatchedRegs;
MatchedRegs.TLI = &TLI;
@ -5540,7 +5540,7 @@ void SelectionDAGBuilder::visitInlineAsm(CallSite CS) {
TLI.LowerAsmOperandForConstraint(InOperandVal, OpInfo.ConstraintCode[0],
hasMemory, Ops, DAG);
if (Ops.empty()) {
llvm_report_error("Invalid operand for inline asm"
report_fatal_error("Invalid operand for inline asm"
" constraint '" + OpInfo.ConstraintCode + "'!");
}
@ -5575,7 +5575,7 @@ void SelectionDAGBuilder::visitInlineAsm(CallSite CS) {
// Copy the input into the appropriate registers.
if (OpInfo.AssignedRegs.Regs.empty() ||
!OpInfo.AssignedRegs.areValueTypesLegal()) {
llvm_report_error("Couldn't allocate input reg for"
report_fatal_error("Couldn't allocate input reg for"
" constraint '"+ OpInfo.ConstraintCode +"'!");
}

View File

@ -1354,7 +1354,7 @@ SelectInlineAsmMemoryOperands(std::vector<SDValue> &Ops) {
// Otherwise, this is a memory operand. Ask the target to select it.
std::vector<SDValue> SelOps;
if (SelectInlineAsmMemoryOperand(InOps[i+1], 'm', SelOps))
llvm_report_error("Could not match memory address. Inline asm"
report_fatal_error("Could not match memory address. Inline asm"
" failure!");
// Add this to the output node.
@ -2778,7 +2778,7 @@ void SelectionDAGISel::CannotYetSelect(SDNode *N) {
else
Msg << "unknown intrinsic #" << iid;
}
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
char SelectionDAGISel::ID = 0;

View File

@ -40,7 +40,7 @@ MachineInstr *TargetInstrInfoImpl::commuteInstruction(MachineInstr *MI,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Don't know how to commute: " << *MI;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
assert(MI->getOperand(Idx1).isReg() && MI->getOperand(Idx2).isReg() &&

View File

@ -619,8 +619,8 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
MCSectionMachO::ParseSectionSpecifier(GV->getSection(), Segment, Section,
TAA, StubSize);
if (!ErrorCode.empty()) {
// If invalid, report the error with llvm_report_error.
llvm_report_error("Global variable '" + GV->getNameStr() +
// If invalid, report the error with report_fatal_error.
report_fatal_error("Global variable '" + GV->getNameStr() +
"' has an invalid section specifier '" + GV->getSection()+
"': " + ErrorCode + ".");
// Fall back to dropping it into the data section.
@ -635,8 +635,8 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
// If the user declared multiple globals with different section flags, we need
// to reject it here.
if (S->getTypeAndAttributes() != TAA || S->getStubSize() != StubSize) {
// If invalid, report the error with llvm_report_error.
llvm_report_error("Global variable '" + GV->getNameStr() +
// If invalid, report the error with report_fatal_error.
report_fatal_error("Global variable '" + GV->getNameStr() +
"' section type or attributes does not match previous"
" section specifier");
}

View File

@ -379,27 +379,27 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
switch (NumArgs) {
case 3:
if (FTy->getParamType(2) != PPInt8Ty) {
llvm_report_error("Invalid type for third argument of main() supplied");
report_fatal_error("Invalid type for third argument of main() supplied");
}
// FALLS THROUGH
case 2:
if (FTy->getParamType(1) != PPInt8Ty) {
llvm_report_error("Invalid type for second argument of main() supplied");
report_fatal_error("Invalid type for second argument of main() supplied");
}
// FALLS THROUGH
case 1:
if (!FTy->getParamType(0)->isIntegerTy(32)) {
llvm_report_error("Invalid type for first argument of main() supplied");
report_fatal_error("Invalid type for first argument of main() supplied");
}
// FALLS THROUGH
case 0:
if (!FTy->getReturnType()->isIntegerTy() &&
!FTy->getReturnType()->isVoidTy()) {
llvm_report_error("Invalid return type of main() supplied");
report_fatal_error("Invalid return type of main() supplied");
}
break;
default:
llvm_report_error("Invalid number of arguments of main() supplied");
report_fatal_error("Invalid number of arguments of main() supplied");
}
ArgvArray CArgv;
@ -771,7 +771,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
std::string msg;
raw_string_ostream Msg(msg);
Msg << "ConstantExpr not handled: " << *CE;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
GenericValue Result;
@ -807,7 +807,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
std::string msg;
raw_string_ostream Msg(msg);
Msg << "ERROR: Constant unimplemented for type: " << *C->getType();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
return Result;
}
@ -935,7 +935,7 @@ void ExecutionEngine::LoadValueFromMemory(GenericValue &Result,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Cannot load value of type " << *Ty << "!";
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
}
@ -1051,7 +1051,7 @@ void ExecutionEngine::emitGlobals() {
sys::DynamicLibrary::SearchForAddressOfSymbol(I->getName()))
addGlobalMapping(I, SymAddr);
else {
llvm_report_error("Could not resolve external global address: "
report_fatal_error("Could not resolve external global address: "
+I->getName());
}
}

View File

@ -631,7 +631,7 @@ void Interpreter::visitUnwindInst(UnwindInst &I) {
do {
ECStack.pop_back();
if (ECStack.empty())
llvm_report_error("Empty stack during unwind!");
report_fatal_error("Empty stack during unwind!");
Inst = ECStack.back().Caller.getInstruction();
} while (!(Inst && isa<InvokeInst>(Inst)));
@ -644,7 +644,7 @@ void Interpreter::visitUnwindInst(UnwindInst &I) {
}
void Interpreter::visitUnreachableInst(UnreachableInst &I) {
llvm_report_error("Program executed an 'unreachable' instruction!");
report_fatal_error("Program executed an 'unreachable' instruction!");
}
void Interpreter::visitBranchInst(BranchInst &I) {

View File

@ -126,7 +126,7 @@ static ffi_type *ffiTypeFor(const Type *Ty) {
default: break;
}
// TODO: Support other types such as StructTyID, ArrayTyID, OpaqueTyID, etc.
llvm_report_error("Type could not be mapped for use with libffi.");
report_fatal_error("Type could not be mapped for use with libffi.");
return NULL;
}
@ -174,7 +174,7 @@ static void *ffiValueFor(const Type *Ty, const GenericValue &AV,
default: break;
}
// TODO: Support other types such as StructTyID, ArrayTyID, OpaqueTyID, etc.
llvm_report_error("Type value could not be mapped for use with libffi.");
report_fatal_error("Type value could not be mapped for use with libffi.");
return NULL;
}
@ -188,7 +188,7 @@ static bool ffiInvoke(RawFunc Fn, Function *F,
// TODO: We don't have type information about the remaining arguments, because
// this information is never passed into ExecutionEngine::runFunction().
if (ArgVals.size() > NumArgs && F->isVarArg()) {
llvm_report_error("Calling external var arg function '" + F->getName()
report_fatal_error("Calling external var arg function '" + F->getName()
+ "' is not supported by the Interpreter.");
}
@ -284,7 +284,7 @@ GenericValue Interpreter::callExternalFunction(Function *F,
errs() << "Tried to execute an unknown external function: "
<< F->getType()->getDescription() << " __main\n";
else
llvm_report_error("Tried to execute an unknown external function: " +
report_fatal_error("Tried to execute an unknown external function: " +
F->getType()->getDescription() + " " +F->getName());
#ifndef USE_LIBFFI
errs() << "Recompiling LLVM with --enable-libffi might help.\n";
@ -325,7 +325,7 @@ GenericValue lle_X_exit(const FunctionType *FT,
GenericValue lle_X_abort(const FunctionType *FT,
const std::vector<GenericValue> &Args) {
//FIXME: should we report or raise here?
//llvm_report_error("Interpreted program raised SIGABRT");
//report_fatal_error("Interpreted program raised SIGABRT");
raise (SIGABRT);
return GenericValue();
}

View File

@ -142,7 +142,7 @@ void *JIT::getPointerToNamedFunction(const std::string &Name,
return RP;
if (AbortOnFailure) {
llvm_report_error("Program used external function '"+Name+
report_fatal_error("Program used external function '"+Name+
"' which could not be resolved!");
}
return 0;

View File

@ -304,7 +304,7 @@ JIT::JIT(Module *M, TargetMachine &tm, TargetJITInfo &tji,
// Turn the machine code intermediate representation into bytes in memory that
// may be executed.
if (TM.addPassesToEmitMachineCode(PM, *JCE, OptLevel)) {
llvm_report_error("Target does not support machine code emission!");
report_fatal_error("Target does not support machine code emission!");
}
// Register routine for informing unwinding runtime about new EH frames
@ -352,7 +352,7 @@ void JIT::addModule(Module *M) {
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) {
llvm_report_error("Target does not support machine code emission!");
report_fatal_error("Target does not support machine code emission!");
}
// Initialize passes.
@ -383,7 +383,7 @@ bool JIT::removeModule(Module *M) {
// Turn the machine code intermediate representation into bytes in memory
// that may be executed.
if (TM.addPassesToEmitMachineCode(PM, *JCE, CodeGenOpt::Default)) {
llvm_report_error("Target does not support machine code emission!");
report_fatal_error("Target does not support machine code emission!");
}
// Initialize passes.
@ -665,7 +665,7 @@ void *JIT::getPointerToFunction(Function *F) {
// exists in this Module.
std::string ErrorMsg;
if (F->Materialize(&ErrorMsg)) {
llvm_report_error("Error reading function '" + F->getName()+
report_fatal_error("Error reading function '" + F->getName()+
"' from bitcode file: " + ErrorMsg);
}
@ -704,7 +704,7 @@ void *JIT::getOrEmitGlobalVariable(const GlobalVariable *GV) {
#endif
Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName());
if (Ptr == 0) {
llvm_report_error("Could not resolve external global address: "
report_fatal_error("Could not resolve external global address: "
+GV->getName());
}
addGlobalMapping(GV, Ptr);
@ -754,7 +754,7 @@ char* JIT::getMemoryForGV(const GlobalVariable* GV) {
// situation. It's returned in the same block of memory as code which may
// not be writable.
if (isGVCompilationDisabled() && !GV->isConstant()) {
llvm_report_error("Compilation of non-internal GlobalValue is disabled!");
report_fatal_error("Compilation of non-internal GlobalValue is disabled!");
}
// Some applications require globals and code to live together, so they may

View File

@ -737,7 +737,7 @@ void *JITResolver::JITCompilerFn(void *Stub) {
// If lazy compilation is disabled, emit a useful error message and abort.
if (!JR->TheJIT->isCompilingLazily()) {
llvm_report_error("LLVM JIT requested to do lazy compilation of function '"
report_fatal_error("LLVM JIT requested to do lazy compilation of function '"
+ F->getName() + "' when lazy compiles are disabled!");
}
@ -945,7 +945,7 @@ unsigned JITEmitter::addSizeOfGlobalsInConstantVal(
std::string msg;
raw_string_ostream Msg(msg);
Msg << "ConstantExpr not handled: " << *CE;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
}
}
@ -1375,7 +1375,7 @@ void JITEmitter::emitConstantPool(MachineConstantPool *MCP) {
ConstPoolAddresses.push_back(CAddr);
if (CPE.isMachineConstantPoolEntry()) {
// FIXME: add support to lower machine constant pool values into bytes!
llvm_report_error("Initialize memory with machine specific constant pool"
report_fatal_error("Initialize memory with machine specific constant pool"
"entry has not been implemented!");
}
TheJIT->InitializeMemory(CPE.Val.ConstVal, (void*)CAddr);

View File

@ -614,7 +614,7 @@ sys::MemoryBlock DefaultJITMemoryManager::allocateNewSlab(size_t size) {
sys::MemoryBlock *LastSlabPtr = LastSlab.base() ? &LastSlab : 0;
sys::MemoryBlock B = sys::Memory::AllocateRWX(size, LastSlabPtr, &ErrMsg);
if (B.base() == 0) {
llvm_report_error("Allocation failed when allocating new memory in the"
report_fatal_error("Allocation failed when allocating new memory in the"
" JIT\n" + ErrMsg);
}
LastSlab = B;

View File

@ -342,7 +342,7 @@ bool MCAssembler::EvaluateFixup(const MCAsmLayout &Layout,
++stats::EvaluateFixup;
if (!Fixup.Value->EvaluateAsRelocatable(Target, &Layout))
llvm_report_error("expected relocatable expression");
report_fatal_error("expected relocatable expression");
// FIXME: How do non-scattered symbols work in ELF? I presume the linker
// doesn't support small relocations, but then under what criteria does the
@ -466,12 +466,12 @@ uint64_t MCAssembler::LayoutSection(MCSectionData &SD,
int64_t TargetLocation;
if (!OF.getOffset().EvaluateAsAbsolute(TargetLocation, &Layout))
llvm_report_error("expected assembly-time absolute expression");
report_fatal_error("expected assembly-time absolute expression");
// FIXME: We need a way to communicate this error.
int64_t Offset = TargetLocation - FragmentOffset;
if (Offset < 0)
llvm_report_error("invalid .org offset '" + Twine(TargetLocation) +
report_fatal_error("invalid .org offset '" + Twine(TargetLocation) +
"' (at offset '" + Twine(FragmentOffset) + "'");
EffectiveSize = Offset;
@ -526,7 +526,7 @@ static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout,
// multiple .align directives to enforce the semantics it wants), but is
// severe enough that we want to report it. How to handle this?
if (Count * AF.getValueSize() != FragmentSize)
llvm_report_error("undefined .align directive, value size '" +
report_fatal_error("undefined .align directive, value size '" +
Twine(AF.getValueSize()) +
"' is not a divisor of padding size '" +
Twine(FragmentSize) + "'");
@ -537,7 +537,7 @@ static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout,
// If we are aligning with nops, ask that target to emit the right data.
if (AF.getEmitNops()) {
if (!Asm.getBackend().WriteNopData(Count, OW))
llvm_report_error("unable to write nop sequence of " +
report_fatal_error("unable to write nop sequence of " +
Twine(Count) + " bytes");
break;
}
@ -662,7 +662,7 @@ void MCAssembler::Finish() {
uint64_t StartOffset = OS.tell();
llvm::OwningPtr<MCObjectWriter> Writer(getBackend().createObjectWriter(OS));
if (!Writer)
llvm_report_error("unable to create object writer!");
report_fatal_error("unable to create object writer!");
// Allow the object writer a chance to perform post-layout binding (for
// example, to set the index fields in the symbol data).

View File

@ -418,7 +418,7 @@ public:
unsigned Log2Size = Log2_32(Align);
assert((1U << Log2Size) == Align && "Invalid 'common' alignment!");
if (Log2Size > 15)
llvm_report_error("invalid 'common' alignment '" +
report_fatal_error("invalid 'common' alignment '" +
Twine(Align) + "'");
// FIXME: Keep this mask with the SymbolFlags enumeration.
Flags = (Flags & 0xF0FF) | (Log2Size << 8);
@ -506,23 +506,23 @@ public:
// Neither symbol can be modified.
if (Target.getSymA()->getKind() != MCSymbolRefExpr::VK_None ||
Target.getSymB()->getKind() != MCSymbolRefExpr::VK_None)
llvm_report_error("unsupported relocation of modified symbol");
report_fatal_error("unsupported relocation of modified symbol");
// We don't support PCrel relocations of differences. Darwin 'as' doesn't
// implement most of these correctly.
if (IsPCRel)
llvm_report_error("unsupported pc-relative relocation of difference");
report_fatal_error("unsupported pc-relative relocation of difference");
// We don't currently support any situation where one or both of the
// symbols would require a local relocation. This is almost certainly
// unused and may not be possible to encode correctly.
if (!A_Base || !B_Base)
llvm_report_error("unsupported local relocations in difference");
report_fatal_error("unsupported local relocations in difference");
// Darwin 'as' doesn't emit correct relocations for this (it ends up with
// a single SIGNED relocation); reject it for now.
if (A_Base == B_Base)
llvm_report_error("unsupported relocation with identical base");
report_fatal_error("unsupported relocation with identical base");
Value += Layout.getSymbolAddress(&A_SD) - Layout.getSymbolAddress(A_Base);
Value -= Layout.getSymbolAddress(&B_SD) - Layout.getSymbolAddress(B_Base);
@ -580,12 +580,12 @@ public:
else
Type = RIT_X86_64_GOT;
} else if (Modifier != MCSymbolRefExpr::VK_None)
llvm_report_error("unsupported symbol modifier in relocation");
report_fatal_error("unsupported symbol modifier in relocation");
else
Type = RIT_X86_64_Signed;
} else {
if (Modifier != MCSymbolRefExpr::VK_None)
llvm_report_error("unsupported symbol modifier in branch "
report_fatal_error("unsupported symbol modifier in branch "
"relocation");
Type = RIT_X86_64_Branch;
@ -622,7 +622,7 @@ public:
Type = RIT_X86_64_GOT;
IsPCRel = 1;
} else if (Modifier != MCSymbolRefExpr::VK_None)
llvm_report_error("unsupported symbol modifier in relocation");
report_fatal_error("unsupported symbol modifier in relocation");
else
Type = RIT_X86_64_Unsigned;
}
@ -657,7 +657,7 @@ public:
MCSymbolData *A_SD = &Asm.getSymbolData(*A);
if (!A_SD->getFragment())
llvm_report_error("symbol '" + A->getName() +
report_fatal_error("symbol '" + A->getName() +
"' can not be undefined in a subtraction expression");
uint32_t Value = Layout.getSymbolAddress(A_SD);
@ -667,7 +667,7 @@ public:
MCSymbolData *B_SD = &Asm.getSymbolData(B->getSymbol());
if (!B_SD->getFragment())
llvm_report_error("symbol '" + B->getSymbol().getName() +
report_fatal_error("symbol '" + B->getSymbol().getName() +
"' can not be undefined in a subtraction expression");
// Select the appropriate difference relocation type.

View File

@ -40,15 +40,15 @@ void llvm_remove_error_handler() {
ErrorHandler = 0;
}
void llvm_report_error(const char *reason) {
llvm_report_error(Twine(reason));
void report_fatal_error(const char *reason) {
report_fatal_error(Twine(reason));
}
void llvm_report_error(const std::string &reason) {
llvm_report_error(Twine(reason));
void report_fatal_error(const std::string &reason) {
report_fatal_error(Twine(reason));
}
void llvm_report_error(const Twine &reason) {
void report_fatal_error(const Twine &reason) {
if (!ErrorHandler) {
errs() << "LLVM ERROR: " << reason << "\n";
} else {

View File

@ -57,11 +57,11 @@ raw_ostream::~raw_ostream() {
delete [] OutBufStart;
// If there are any pending errors, report them now. Clients wishing
// to avoid llvm_report_error calls should check for errors with
// to avoid report_fatal_error calls should check for errors with
// has_error() and clear the error flag with clear_error() before
// destructing raw_ostream objects which may have errors.
if (Error)
llvm_report_error("IO failure on output stream.");
report_fatal_error("IO failure on output stream.");
}
// An out of line virtual method to provide a home for the class vtable.

View File

@ -559,7 +559,7 @@ void ARMCodeEmitter::emitPseudoInstruction(const MachineInstr &MI) {
// We allow inline assembler nodes with empty bodies - they can
// implicitly define registers, which is ok for JIT.
if (MI.getOperand(0).getSymbolName()[0]) {
llvm_report_error("JIT does not support inline asm!");
report_fatal_error("JIT does not support inline asm!");
}
break;
}
@ -704,7 +704,7 @@ void ARMCodeEmitter::emitDataProcessingInstruction(const MachineInstr &MI,
const TargetInstrDesc &TID = MI.getDesc();
if (TID.Opcode == ARM::BFC) {
llvm_report_error("ARMv6t2 JIT is not yet supported.");
report_fatal_error("ARMv6t2 JIT is not yet supported.");
}
// Part of binary is determined by TableGn.

View File

@ -27,7 +27,7 @@
using namespace llvm;
void ARMJITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
llvm_report_error("ARMJITInfo::replaceMachineCodeForFunction");
report_fatal_error("ARMJITInfo::replaceMachineCodeForFunction");
}
/// JITCompilerFunction - This contains the address of the JIT function used to

View File

@ -309,7 +309,7 @@ SDNode *AlphaDAGToDAGISel::Select(SDNode *N) {
T, CurDAG->getRegister(Alpha::F31, T),
CurDAG->getRegister(Alpha::F31, T));
} else {
llvm_report_error("Unhandled FP constant type");
report_fatal_error("Unhandled FP constant type");
}
break;
}

View File

@ -251,7 +251,7 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const {
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Too big a stack frame at " << NumBytes;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
//now if we need to, save the old FP and set the new
@ -303,7 +303,7 @@ void AlphaRegisterInfo::emitEpilogue(MachineFunction &MF,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Too big a stack frame at " << NumBytes;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
}
}

View File

@ -1344,7 +1344,7 @@ void CWriter::writeInstComputationInline(Instruction &I) {
Ty!=Type::getInt16Ty(I.getContext()) &&
Ty!=Type::getInt32Ty(I.getContext()) &&
Ty!=Type::getInt64Ty(I.getContext()))) {
llvm_report_error("The C backend does not currently support integer "
report_fatal_error("The C backend does not currently support integer "
"types of widths other than 1, 8, 16, 32, 64.\n"
"This is being tracked as PR 4158.");
}
@ -2993,7 +2993,7 @@ bool CWriter::visitBuiltinCall(CallInst &I, Intrinsic::ID ID,
Msg << "The C backend does not currently support zero "
<< "argument varargs functions, such as '"
<< I.getParent()->getParent()->getName() << "'!";
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
writeOperand(--I.getParent()->getParent()->arg_end());
Out << ')';

View File

@ -280,7 +280,7 @@ namespace {
void SPUAsmPrinter::printOp(const MachineOperand &MO, raw_ostream &O) {
switch (MO.getType()) {
case MachineOperand::MO_Immediate:
llvm_report_error("printOp() does not handle immediate values");
report_fatal_error("printOp() does not handle immediate values");
return;
case MachineOperand::MO_MachineBasicBlock:

View File

@ -198,7 +198,7 @@ namespace {
raw_string_ostream Msg(msg);
Msg << "SPUISelDAGToDAG.cpp: getValueTypeMapEntry returns NULL for "
<< VT.getEVTString();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
#endif
@ -433,13 +433,13 @@ SPUDAGToDAGISel::SelectAFormAddr(SDNode *Op, SDValue N, SDValue &Base,
case ISD::Constant:
case ISD::ConstantPool:
case ISD::GlobalAddress:
llvm_report_error("SPU SelectAFormAddr: Constant/Pool/Global not lowered.");
report_fatal_error("SPU SelectAFormAddr: Constant/Pool/Global not lowered.");
/*NOTREACHED*/
case ISD::TargetConstant:
case ISD::TargetGlobalAddress:
case ISD::TargetJumpTable:
llvm_report_error("SPUSelectAFormAddr: Target Constant/Pool/Global "
report_fatal_error("SPUSelectAFormAddr: Target Constant/Pool/Global "
"not wrapped as A-form address.");
/*NOTREACHED*/
@ -725,7 +725,7 @@ SPUDAGToDAGISel::Select(SDNode *N) {
switch (Op0VT.getSimpleVT().SimpleTy) {
default:
llvm_report_error("CellSPU Select: Unhandled zero/any extend EVT");
report_fatal_error("CellSPU Select: Unhandled zero/any extend EVT");
/*NOTREACHED*/
case MVT::i32:
shufMask = CurDAG->getNode(ISD::BUILD_VECTOR, dl, MVT::v4i32,
@ -919,7 +919,7 @@ SPUDAGToDAGISel::Select(SDNode *N) {
raw_string_ostream Msg(msg);
Msg << "LDRESULT for unsupported type: "
<< VT.getEVTString();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
Opc = vtm->ldresult_ins;
@ -1252,7 +1252,7 @@ SDNode *SPUDAGToDAGISel::SelectI64Constant(uint64_t Value64, EVT OpVT,
return CurDAG->getMachineNode(SPU::ORi64_v2i64, dl, OpVT,
SDValue(emitBuildVector(i64vec.getNode()), 0));
} else {
llvm_report_error("SPUDAGToDAGISel::SelectI64Constant: Unhandled i64vec"
report_fatal_error("SPUDAGToDAGISel::SelectI64Constant: Unhandled i64vec"
"condition");
}
}

View File

@ -75,7 +75,7 @@ namespace {
raw_string_ostream Msg(msg);
Msg << "getValueTypeMapEntry returns NULL for "
<< VT.getEVTString();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
#endif
@ -719,7 +719,7 @@ LowerLOAD(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST) {
Msg << "LowerLOAD: Got a LoadSDNode with an addr mode other than "
"UNINDEXED\n";
Msg << (unsigned) LN->getAddressingMode();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
/*NOTREACHED*/
}
}
@ -889,7 +889,7 @@ LowerSTORE(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST) {
Msg << "LowerLOAD: Got a LoadSDNode with an addr mode other than "
"UNINDEXED\n";
Msg << (unsigned) SN->getAddressingMode();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
/*NOTREACHED*/
}
}
@ -976,7 +976,7 @@ LowerGlobalAddress(SDValue Op, SelectionDAG &DAG, const SPUSubtarget *ST) {
return DAG.getNode(SPUISD::IndirectAddr, dl, PtrVT, Hi, Lo);
}
} else {
llvm_report_error("LowerGlobalAddress: Relocation model other than static"
report_fatal_error("LowerGlobalAddress: Relocation model other than static"
"not supported.");
/*NOTREACHED*/
}
@ -1043,7 +1043,7 @@ SPUTargetLowering::LowerFormalArguments(SDValue Chain,
raw_string_ostream Msg(msg);
Msg << "LowerFormalArguments Unhandled argument type: "
<< ObjectVT.getEVTString();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
case MVT::i8:
ArgRegClass = &SPU::R8CRegClass;
@ -1586,7 +1586,7 @@ LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) {
raw_string_ostream Msg(msg);
Msg << "CellSPU: Unhandled VT in LowerBUILD_VECTOR, VT = "
<< VT.getEVTString();
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
/*NOTREACHED*/
}
case MVT::v4f32: {
@ -2004,7 +2004,7 @@ static SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) {
// slot 0 across the vector
EVT VecVT = N.getValueType();
if (!VecVT.isSimple() || !VecVT.isVector() || !VecVT.is128BitVector()) {
llvm_report_error("LowerEXTRACT_VECTOR_ELT: Must have a simple, 128-bit"
report_fatal_error("LowerEXTRACT_VECTOR_ELT: Must have a simple, 128-bit"
"vector type!");
}
@ -2032,7 +2032,7 @@ static SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG) {
switch (VT.getSimpleVT().SimpleTy) {
default:
llvm_report_error("LowerEXTRACT_VECTOR_ELT(varable): Unhandled vector"
report_fatal_error("LowerEXTRACT_VECTOR_ELT(varable): Unhandled vector"
"type");
/*NOTREACHED*/
case MVT::i8: {
@ -2515,7 +2515,7 @@ static SDValue LowerSETCC(SDValue Op, SelectionDAG &DAG,
case ISD::SETONE:
compareOp = ISD::SETNE; break;
default:
llvm_report_error("CellSPU ISel Select: unimplemented f64 condition");
report_fatal_error("CellSPU ISel Select: unimplemented f64 condition");
}
SDValue result =

View File

@ -179,7 +179,7 @@ unsigned SPURegisterInfo::getRegisterNumbering(unsigned RegEnum) {
case SPU::R126: return 126;
case SPU::R127: return 127;
default:
llvm_report_error("Unhandled reg in SPURegisterInfo::getRegisterNumbering");
report_fatal_error("Unhandled reg in SPURegisterInfo::getRegisterNumbering");
}
}
@ -512,7 +512,7 @@ void SPURegisterInfo::emitPrologue(MachineFunction &MF) const
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Unhandled frame size: " << FrameSize;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
if (hasDebugInfo) {
@ -608,7 +608,7 @@ SPURegisterInfo::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Unhandled frame size: " << FrameSize;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
}
}

View File

@ -210,7 +210,7 @@ namespace {
}
void CppWriter::error(const std::string& msg) {
llvm_report_error(msg);
report_fatal_error(msg);
}
// printCFP - Print a floating point constant .. very carefully :)

View File

@ -264,7 +264,7 @@ MSP430TargetLowering::LowerFormalArguments(SDValue Chain,
if (Ins.empty())
return Chain;
else {
llvm_report_error("ISRs cannot have arguments");
report_fatal_error("ISRs cannot have arguments");
return SDValue();
}
}
@ -289,7 +289,7 @@ MSP430TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
return LowerCCCCallTo(Chain, Callee, CallConv, isVarArg, isTailCall,
Outs, Ins, dl, DAG, InVals);
case CallingConv::MSP430_INTR:
llvm_report_error("ISRs cannot be called directly");
report_fatal_error("ISRs cannot be called directly");
return SDValue();
}
}
@ -390,7 +390,7 @@ MSP430TargetLowering::LowerReturn(SDValue Chain,
// ISRs cannot return any value.
if (CallConv == CallingConv::MSP430_INTR && !Outs.empty()) {
llvm_report_error("ISRs cannot return any value");
report_fatal_error("ISRs cannot return any value");
return SDValue();
}

View File

@ -293,7 +293,7 @@ SystemZTargetLowering::LowerCCCArguments(SDValue Chain,
CCInfo.AnalyzeFormalArguments(Ins, CC_SystemZ);
if (isVarArg)
llvm_report_error("Varargs not supported yet");
report_fatal_error("Varargs not supported yet");
for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
SDValue ArgValue;

View File

@ -228,7 +228,7 @@ void TargetData::init(StringRef Desc) {
/// @note This has to exist, because this is a pass, but it should never be
/// used.
TargetData::TargetData() : ImmutablePass(&ID) {
llvm_report_error("Bad TargetData ctor used. "
report_fatal_error("Bad TargetData ctor used. "
"Tool did not specify a TargetData to use?");
}

View File

@ -310,7 +310,7 @@ getExprForDwarfReference(const MCSymbol *Sym, Mangler *Mang,
switch (Encoding & 0xF0) {
default:
llvm_report_error("We do not support this DWARF encoding yet!");
report_fatal_error("We do not support this DWARF encoding yet!");
case dwarf::DW_EH_PE_absptr:
// Do nothing special
return Res;

View File

@ -111,7 +111,7 @@ void X86AsmBackend::RelaxInstruction(const MCInstFragment *IF,
SmallString<256> Tmp;
raw_svector_ostream OS(Tmp);
IF->getInst().dump_pretty(OS);
llvm_report_error("unexpected instruction to relax: " + OS.str());
report_fatal_error("unexpected instruction to relax: " + OS.str());
}
Res = IF->getInst();

View File

@ -600,7 +600,7 @@ void Emitter<CodeEmitter>::emitInstruction(const MachineInstr &MI,
// We allow inline assembler nodes with empty bodies - they can
// implicitly define registers, which is ok for JIT.
if (MI.getOperand(0).getSymbolName()[0])
llvm_report_error("JIT does not support inline asm!");
report_fatal_error("JIT does not support inline asm!");
break;
case TargetOpcode::DBG_LABEL:
case TargetOpcode::GC_LABEL:

View File

@ -1304,7 +1304,7 @@ X86TargetLowering::LowerCallResult(SDValue Chain, SDValue InFlag,
// If this is x86-64, and we disabled SSE, we can't return FP values
if ((CopyVT == MVT::f32 || CopyVT == MVT::f64) &&
((Is64Bit || Ins[i].Flags.isInReg()) && !Subtarget->hasSSE1())) {
llvm_report_error("SSE register return with SSE disabled");
report_fatal_error("SSE register return with SSE disabled");
}
// If this is a call to a function that returns an fp value on the floating
@ -6816,7 +6816,7 @@ SDValue X86TargetLowering::LowerVAARG(SDValue Op, SelectionDAG &DAG) {
SDValue SrcPtr = Op.getOperand(1);
SDValue SrcSV = Op.getOperand(2);
llvm_report_error("VAArgInst is not yet implemented for x86-64!");
report_fatal_error("VAArgInst is not yet implemented for x86-64!");
return SDValue();
}
@ -7233,7 +7233,7 @@ SDValue X86TargetLowering::LowerTRAMPOLINE(SDValue Op,
InRegCount += (TD->getTypeSizeInBits(*I) + 31) / 32;
if (InRegCount > 2) {
llvm_report_error("Nest register in use - reduce number of inreg parameters!");
report_fatal_error("Nest register in use - reduce number of inreg parameters!");
}
}
break;

View File

@ -3604,7 +3604,7 @@ static unsigned GetInstSizeWithDesc(const MachineInstr &MI,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "Cannot determine size: " << MI;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}

View File

@ -464,7 +464,7 @@ bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const {
// variable-sized allocas.
// FIXME: Temporary disable the error - it seems to be too conservative.
if (0 && requiresRealignment && MFI->hasVarSizedObjects())
llvm_report_error(
report_fatal_error(
"Stack realignment in presense of dynamic allocas is not supported");
return (requiresRealignment && !MFI->hasVarSizedObjects());

View File

@ -123,7 +123,7 @@ void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
switch (GV->getLinkage()) {
case GlobalValue::AppendingLinkage:
llvm_report_error("AppendingLinkage is not supported by this target!");
report_fatal_error("AppendingLinkage is not supported by this target!");
case GlobalValue::LinkOnceAnyLinkage:
case GlobalValue::LinkOnceODRLinkage:
case GlobalValue::WeakAnyLinkage:

View File

@ -229,7 +229,7 @@ XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "eliminateFrameIndex Frame size too big: " << Offset;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
unsigned ScratchReg = RS->scavengeRegister(XCore::GRRegsRegisterClass, II,
SPAdj);
@ -282,7 +282,7 @@ XCoreRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "eliminateFrameIndex Frame size too big: " << Offset;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
switch (MI.getOpcode()) {
@ -363,7 +363,7 @@ loadConstant(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "loadConstant value too big " << Value;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
int Opcode = isImmU6(Value) ? XCore::LDC_ru6 : XCore::LDC_lru6;
BuildMI(MBB, I, dl, TII.get(Opcode), DstReg).addImm(Value);
@ -379,7 +379,7 @@ storeToStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "storeToStack offset too big " << Offset;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
int Opcode = isU6 ? XCore::STWSP_ru6 : XCore::STWSP_lru6;
BuildMI(MBB, I, dl, TII.get(Opcode))
@ -397,7 +397,7 @@ loadFromStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator I,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "loadFromStack offset too big " << Offset;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
int Opcode = isU6 ? XCore::LDWSP_ru6 : XCore::LDWSP_lru6;
BuildMI(MBB, I, dl, TII.get(Opcode), DstReg)
@ -428,7 +428,7 @@ void XCoreRegisterInfo::emitPrologue(MachineFunction &MF) const {
std::string msg;
raw_string_ostream Msg(msg);
Msg << "emitPrologue Frame size too big: " << FrameSize;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
bool emitFrameMoves = needsFrameMoves(MF);
@ -552,7 +552,7 @@ void XCoreRegisterInfo::emitEpilogue(MachineFunction &MF,
std::string msg;
raw_string_ostream Msg(msg);
Msg << "emitEpilogue Frame size too big: " << FrameSize;
llvm_report_error(Msg.str());
report_fatal_error(Msg.str());
}
if (FrameSize) {

View File

@ -751,7 +751,7 @@ ExtractCodeRegion(const std::vector<BasicBlock*> &code) {
// verifyFunction(*oldFunction);
DEBUG(if (verifyFunction(*newFunction))
llvm_report_error("verifyFunction failed!"));
report_fatal_error("verifyFunction failed!"));
return newFunction;
}

View File

@ -1294,7 +1294,7 @@ bool FunctionPassManager::run(Function &F) {
if (F.isMaterializable()) {
std::string errstr;
if (F.Materialize(&errstr))
llvm_report_error("Error reading bitcode file: " + errstr);
report_fatal_error("Error reading bitcode file: " + errstr);
}
return FPM->run(F);
}

View File

@ -93,7 +93,7 @@ namespace { // Anonymous namespace for class
}
if (Broken)
llvm_report_error("Broken module, no Basic Block terminator!");
report_fatal_error("Broken module, no Basic Block terminator!");
return false;
}

View File

@ -249,7 +249,7 @@ void CodeEmitterGen::run(raw_ostream &o) {
<< " std::string msg;\n"
<< " raw_string_ostream Msg(msg);\n"
<< " Msg << \"Not supported instr: \" << MI;\n"
<< " llvm_report_error(Msg.str());\n"
<< " report_fatal_error(Msg.str());\n"
<< " }\n"
<< " return Value;\n"
<< "}\n\n";