mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
Corrected assert messages for CreateZExtOrTrunc/CreateSExtOrTrunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172958 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8b28998777
commit
bd12e22d7a
@ -1028,7 +1028,8 @@ public:
|
||||
/// DestTy. Return the value untouched if the type of V is already DestTy.
|
||||
Value *CreateZExtOrTrunc(Value *V, IntegerType *DestTy,
|
||||
const Twine &Name = "") {
|
||||
assert(isa<IntegerType>(V->getType()) && "Can only zero extend integers!");
|
||||
assert(isa<IntegerType>(V->getType()) &&
|
||||
"Can only zero extend/truncate integers!");
|
||||
IntegerType *IntTy = cast<IntegerType>(V->getType());
|
||||
if (IntTy->getBitWidth() < DestTy->getBitWidth())
|
||||
return CreateZExt(V, DestTy, Name);
|
||||
@ -1040,7 +1041,8 @@ public:
|
||||
/// DestTy. Return the value untouched if the type of V is already DestTy.
|
||||
Value *CreateSExtOrTrunc(Value *V, IntegerType *DestTy,
|
||||
const Twine &Name = "") {
|
||||
assert(isa<IntegerType>(V->getType()) && "Can only sign extend integers!");
|
||||
assert(isa<IntegerType>(V->getType()) &&
|
||||
"Can only sign extend/truncate integers!");
|
||||
IntegerType *IntTy = cast<IntegerType>(V->getType());
|
||||
if (IntTy->getBitWidth() < DestTy->getBitWidth())
|
||||
return CreateSExt(V, DestTy, Name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user