mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
assert(0) -> LLVM_UNREACHABLE.
Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include <string>
|
||||
|
||||
@@ -111,9 +112,8 @@ public:
|
||||
/// @note This has to exist, because this is a pass, but it should never be
|
||||
/// used.
|
||||
TargetData() : ImmutablePass(&ID) {
|
||||
assert(0 && "ERROR: Bad TargetData ctor used. "
|
||||
"Tool did not specify a TargetData to use?");
|
||||
abort();
|
||||
llvm_report_error("ERROR: Bad TargetData ctor used. "
|
||||
"Tool did not specify a TargetData to use?");
|
||||
}
|
||||
|
||||
/// Constructs a TargetData from a specification string. See init().
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_TARGET_TARGETINSTRINFO_H
|
||||
#define LLVM_TARGET_TARGETINSTRINFO_H
|
||||
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Target/TargetInstrDesc.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
|
||||
@@ -428,8 +429,7 @@ public:
|
||||
/// point.
|
||||
virtual void insertNoop(MachineBasicBlock &MBB,
|
||||
MachineBasicBlock::iterator MI) const {
|
||||
assert(0 && "Target didn't implement insertNoop!");
|
||||
abort();
|
||||
LLVM_UNREACHABLE("Target didn't implement insertNoop!");
|
||||
}
|
||||
|
||||
/// isPredicated - Returns true if the instruction is already predicated.
|
||||
|
||||
Reference in New Issue
Block a user