#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSet.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Mangler.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
// Print out labels for the function.
const Function *F = MF.getFunction();
switch (F->getLinkage()) {
- default: assert(0 && "Unknown linkage type!");
+ default: LLVM_UNREACHABLE("Unknown linkage type!");
case Function::PrivateLinkage:
case Function::InternalLinkage:
SwitchToTextSection("\t.text", F);
O << TRI->getAsmName(Reg);
}
} else
- assert(0 && "not implemented");
+ LLVM_UNREACHABLE("not implemented");
break;
}
case MachineOperand::MO_Immediate: {
case GlobalValue::InternalLinkage:
break;
default:
- assert(0 && "Unknown linkage type!");
- break;
+ LLVM_UNREACHABLE("Unknown linkage type!");
}
EmitAlignment(Align, GVar);
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/Support/CommandLine.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Streams.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Config/config.h"
}
void CppWriter::error(const std::string& msg) {
- cerr << msg << "\n";
- exit(2);
+ llvm_report_error(msg);
}
// printCFP - Print a floating point constant .. very carefully :)