[llvm-commits] [llvm] r172958 - /llvm/trunk/include/llvm/IR/IRBuilder.h

Michael Gottesman mgottesman at apple.com
Sat Jan 19 20:19:39 PST 2013


Author: mgottesman
Date: Sat Jan 19 22:19:39 2013
New Revision: 172958

URL: http://llvm.org/viewvc/llvm-project?rev=172958&view=rev
Log:
Corrected assert messages for CreateZExtOrTrunc/CreateSExtOrTrunc.

Modified:
    llvm/trunk/include/llvm/IR/IRBuilder.h

Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=172958&r1=172957&r2=172958&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Sat Jan 19 22:19:39 2013
@@ -1028,7 +1028,8 @@
   /// 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 @@
   /// 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);





More information about the llvm-commits mailing list