aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-01-20 04:19:39 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-01-20 04:19:39 +0000
commitbd12e22d7af1609af2b9614dcab2a035d7388a79 (patch)
tree1e124b015bad35887b66bd728baa41d4d1367b96
parent8b289987770bae81752f934fc089c93099864324 (diff)
Corrected assert messages for CreateZExtOrTrunc/CreateSExtOrTrunc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172958 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/IR/IRBuilder.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/IR/IRBuilder.h b/include/llvm/IR/IRBuilder.h
index abd6f90627..25091f9da4 100644
--- a/include/llvm/IR/IRBuilder.h
+++ b/include/llvm/IR/IRBuilder.h
@@ -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);