mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
From Dan Gohman:
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
This commit is contained in:
@ -1265,7 +1265,7 @@ Value *BytecodeReader::ParseConstantPoolValue(unsigned TypeID) {
|
|||||||
Result = ConstantInt::get(IT, Val);
|
Result = ConstantInt::get(IT, Val);
|
||||||
if (Handler) Handler->handleConstantValue(Result);
|
if (Handler) Handler->handleConstantValue(Result);
|
||||||
} else
|
} else
|
||||||
assert("Integer types > 64 bits not supported");
|
assert(0 && "Integer types > 64 bits not supported");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Type::FloatTyID: {
|
case Type::FloatTyID: {
|
||||||
|
@ -313,7 +313,7 @@ void BytecodeWriter::outputConstant(const Constant *CPV) {
|
|||||||
else if (NumBits <= 64)
|
else if (NumBits <= 64)
|
||||||
output_vbr(uint64_t(cast<ConstantInt>(CPV)->getZExtValue()));
|
output_vbr(uint64_t(cast<ConstantInt>(CPV)->getZExtValue()));
|
||||||
else
|
else
|
||||||
assert("Integer types > 64 bits not supported.");
|
assert(0 && "Integer types > 64 bits not supported.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,7 +292,7 @@ void *ExecutionEngine::getPointerToGlobal(const GlobalValue *GV) {
|
|||||||
const_cast<GlobalVariable *>(dyn_cast<GlobalVariable>(GV)))
|
const_cast<GlobalVariable *>(dyn_cast<GlobalVariable>(GV)))
|
||||||
EmitGlobalVariable(GVar);
|
EmitGlobalVariable(GVar);
|
||||||
else
|
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];
|
return state.getGlobalAddressMap(locked)[GV];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -425,7 +425,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
|
|||||||
else if (BitWidth <= 64)
|
else if (BitWidth <= 64)
|
||||||
Result.Int64Val = (uint64_t )cast<ConstantInt>(C)->getZExtValue();
|
Result.Int64Val = (uint64_t )cast<ConstantInt>(C)->getZExtValue();
|
||||||
else
|
else
|
||||||
assert("Integers with > 64-bits not implemented");
|
assert(0 && "Integers with > 64-bits not implemented");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1690,7 +1690,7 @@ void Interpreter::visitVAArgInst(VAArgInst &I) {
|
|||||||
else if (BitWidth <= 64)
|
else if (BitWidth <= 64)
|
||||||
Dest.Int64Val = Src.Int64Val;
|
Dest.Int64Val = Src.Int64Val;
|
||||||
else
|
else
|
||||||
assert("Integer types > 64 bits not supported");
|
assert(0 && "Integer types > 64 bits not supported");
|
||||||
maskToBitWidth(Dest, BitWidth);
|
maskToBitWidth(Dest, BitWidth);
|
||||||
}
|
}
|
||||||
IMPLEMENT_VAARG(Pointer);
|
IMPLEMENT_VAARG(Pointer);
|
||||||
|
Reference in New Issue
Block a user