summaryrefslogtreecommitdiff
path: root/lib/VMCore/Globals.cpp
diff options
context:
space:
mode:
authorTorok Edwin <edwintorok@gmail.com>2009-07-08 18:01:40 +0000
committerTorok Edwin <edwintorok@gmail.com>2009-07-08 18:01:40 +0000
commitab7c09b6b6f4516a631fd6788918c237c83939af (patch)
treeedf8970f645aa30e8d15802d5ef85768dcaf0412 /lib/VMCore/Globals.cpp
parent4de77f8afcf5920234c86bd8fba3b164b1a17a72 (diff)
downloadllvm-ab7c09b6b6f4516a631fd6788918c237c83939af.tar.gz
llvm-ab7c09b6b6f4516a631fd6788918c237c83939af.tar.bz2
llvm-ab7c09b6b6f4516a631fd6788918c237c83939af.tar.xz
Start converting to new error handling API.
cerr+abort -> llvm_report_error assert(0)+abort -> LLVM_UNREACHABLE (assert(0)+llvm_unreachable-> abort() included) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75018 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Globals.cpp')
-rw-r--r--lib/VMCore/Globals.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp
index c31b7b5e76..f8c1071052 100644
--- a/lib/VMCore/Globals.cpp
+++ b/lib/VMCore/Globals.cpp
@@ -19,6 +19,7 @@
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/ADT/SmallPtrSet.h"
+#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/LeakDetector.h"
using namespace llvm;
@@ -77,8 +78,7 @@ void GlobalValue::removeDeadConstantUsers() const {
/// Override destroyConstant to make sure it doesn't get called on
/// GlobalValue's because they shouldn't be treated like other constants.
void GlobalValue::destroyConstant() {
- assert(0 && "You can't GV->destroyConstant()!");
- abort();
+ LLVM_UNREACHABLE("You can't GV->destroyConstant()!");
}
/// copyAttributesFrom - copy all additional attributes (those not needed to
@@ -247,7 +247,7 @@ const GlobalValue *GlobalAlias::getAliasedGlobal() const {
CE->getOpcode() == Instruction::GetElementPtr))
return dyn_cast<GlobalValue>(CE->getOperand(0));
else
- assert(0 && "Unsupported aliasee");
+ LLVM_UNREACHABLE("Unsupported aliasee");
}
}
return 0;