diff options
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/VMCore/Globals.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/VMCore/Type.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/VMCore/Value.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 4 |
6 files changed, 12 insertions, 6 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 70c27eb5111..ec299171982 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -33,6 +33,7 @@ #include "llvm/Support/CFG.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/Streams.h" #include "llvm/Support/raw_ostream.h" #include <algorithm> #include <cctype> @@ -1235,7 +1236,7 @@ static void PrintLinkage(GlobalValue::LinkageTypes LT, raw_ostream &Out) { case GlobalValue::ExternalWeakLinkage: Out << "extern_weak "; break; case GlobalValue::ExternalLinkage: break; case GlobalValue::GhostLinkage: - llvm_report_error("GhostLinkage not allowed in AsmWriter!"); + LLVM_UNREACHABLE("GhostLinkage not allowed in AsmWriter!"); } } diff --git a/llvm/lib/VMCore/Globals.cpp b/llvm/lib/VMCore/Globals.cpp index b3087f7cc43..c3fe5683eca 100644 --- a/llvm/lib/VMCore/Globals.cpp +++ b/llvm/lib/VMCore/Globals.cpp @@ -21,6 +21,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/LeakDetector.h" +#include "llvm/Support/Streams.h" using namespace llvm; //===----------------------------------------------------------------------===// diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index 66269301847..bbb22c5a64b 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -20,6 +20,7 @@ #include "llvm/Support/CallSite.h" #include "llvm/Support/ConstantRange.h" #include "llvm/Support/MathExtras.h" +#include "llvm/Support/Streams.h" using namespace llvm; //===----------------------------------------------------------------------===// diff --git a/llvm/lib/VMCore/Type.cpp b/llvm/lib/VMCore/Type.cpp index 432a1cca818..8daaf915e41 100644 --- a/llvm/lib/VMCore/Type.cpp +++ b/llvm/lib/VMCore/Type.cpp @@ -265,10 +265,10 @@ const Type *Type::getForwardedTypeInternal() const { } void Type::refineAbstractType(const DerivedType *OldTy, const Type *NewTy) { - llvm_report_error("Attempting to refine a derived type!"); + LLVM_UNREACHABLE("Attempting to refine a derived type!"); } void Type::typeBecameConcrete(const DerivedType *AbsTy) { - llvm_report_error("DerivedType is already a concrete type!"); + LLVM_UNREACHABLE("DerivedType is already a concrete type!"); } diff --git a/llvm/lib/VMCore/Value.cpp b/llvm/lib/VMCore/Value.cpp index 8c5d551c15e..0120333481c 100644 --- a/llvm/lib/VMCore/Value.cpp +++ b/llvm/lib/VMCore/Value.cpp @@ -23,6 +23,7 @@ #include "llvm/Support/LeakDetector.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/ValueHandle.h" +#include "llvm/Support/raw_ostream.h" #include "llvm/System/RWMutex.h" #include "llvm/System/Threading.h" #include "llvm/ADT/DenseMap.h" @@ -515,8 +516,8 @@ void ValueHandleBase::ValueIsDeleted(Value *V) { cerr << "While deleting: " << *V->getType() << " %" << V->getNameStr() << "\n"; #endif - llvm_report_error("An asserting value handle still pointed to this" - "value!"); + LLVM_UNREACHABLE("An asserting value handle still pointed to this" + "value!"); case Weak: // Weak just goes to null, which will unlink it from the list. ThisNode->operator=(0); diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 6674acb79de..da3fed0ff3c 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -211,7 +211,9 @@ namespace { default: assert(0 && "Unknown action"); case AbortProcessAction: msgs << "compilation aborted!\n"; - llvm_report_error(msgs.str()); + cerr << msgs.str(); + // Client should choose different reaction if abort is not desired + abort(); case PrintMessageAction: msgs << "verification continues.\n"; cerr << msgs.str(); |