From Dan Gohman:
authorChris Lattner <sabre@nondot.org>
Wed, 14 Feb 2007 06:20:04 +0000 (06:20 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Feb 2007 06:20:04 +0000 (06:20 +0000)
While preparing http://llvm.org/PR1198 I noticed several asserts
protecting unprepared code from i128 types that weren't actually failing
when they should because they were written as assert("foo") instead of
something like assert(0 && "foo"). This patch fixes all the cases that a
quick grep found.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34267 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Reader/Reader.cpp
lib/Bytecode/Writer/Writer.cpp
lib/ExecutionEngine/ExecutionEngine.cpp
lib/ExecutionEngine/Interpreter/Execution.cpp

index d16105153627eb50e880a26e23b34911c8712269..d516910d80f36f69871ff282705b8c89d01e3932 100644 (file)
@@ -1265,7 +1265,7 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
       Result = ConstantInt::get(IT, Val);
       if (Handler) Handler->handleConstantValue(Result);
     } else 
-      assert("Integer types > 64 bits not supported");
+      assert(0 && "Integer types > 64 bits not supported");
     break;
   }
   case Type::FloatTyID: {
index 434703f92e2f066b283015e01202d3ab2993d2e6..78d628343e730e03507991871efca4d8bfcca84c 100644 (file)
@@ -313,7 +313,7 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
     else if (NumBits <= 64)
       output_vbr(uint64_t(cast<ConstantInt>(CPV)->getZExtValue()));
     else 
-      assert("Integer types > 64 bits not supported.");
+      assert(0 && "Integer types > 64 bits not supported.");
     break;
   }
 
index 28b515e3faf20bfadce3eb001060be3377a656b2..f0ba43477dfcb8382e44b27646c11b73c7fcd6ce 100644 (file)
@@ -292,7 +292,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
           const_cast<GlobalVariable *>(dyn_cast<GlobalVariable>(GV)))
     EmitGlobalVariable(GVar);
   else
-    assert("Global hasn't had an address allocated yet!");
+    assert(0 && "Global hasn't had an address allocated yet!");
   return state.getGlobalAddressMap(locked)[GV];
 }
 
@@ -425,7 +425,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
     else if (BitWidth <= 64)
       Result.Int64Val = (uint64_t )cast<ConstantInt>(C)->getZExtValue();
     else
-      assert("Integers with > 64-bits not implemented");
+      assert(0 && "Integers with > 64-bits not implemented");
     break;
   }
 
index 936d64f444138c614b50f8f1d18da17d04f6061b..c6dcc5cbc030135d48d29c715dea01a6bfeaef1d 100644 (file)
@@ -1690,7 +1690,7 @@ void Interpreter::visitVAArgInst(VAArgInst &I) {
       else if (BitWidth <= 64)
         Dest.Int64Val = Src.Int64Val;
       else
-        assert("Integer types > 64 bits not supported");
+        assert(0 && "Integer types > 64 bits not supported");
       maskToBitWidth(Dest, BitWidth);
     }
     IMPLEMENT_VAARG(Pointer);