[llvm-commits] [dragonegg] r173145 - /dragonegg/trunk/src/Convert.cpp
NAKAMURA Takumi
geek4civic at gmail.com
Tue Jan 22 02:43:01 PST 2013
Author: chapuni
Date: Tue Jan 22 04:43:01 2013
New Revision: 173145
URL: http://llvm.org/viewvc/llvm-project?rev=173145&view=rev
Log:
Convert.cpp: Suppress a warning. [-Wunused-variable]
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=173145&r1=173144&r2=173145&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Tue Jan 22 04:43:01 2013
@@ -1860,17 +1860,17 @@
/// CastFromSameSizeInteger - Cast an integer (or vector of integer) value to
/// the given scalar (resp. vector of scalar) type of the same bitwidth.
Value *TreeToLLVM::CastFromSameSizeInteger(Value *V, Type *Ty) {
- Type *OrigTy = V->getType();
- assert(OrigTy->getScalarType()->isIntegerTy() && "Expected an integer type!");
+ assert(V->getType()->getScalarType()->isIntegerTy() &&
+ "Expected an integer type!");
Type *EltTy = Ty->getScalarType();
if (EltTy->isIntegerTy()) {
// Already an integer/vector of integer - nothing to do.
- assert(OrigTy == Ty && "Integer type not same size!");
+ assert(V->getType() == Ty && "Integer type not same size!");
return V;
}
if (EltTy->isPointerTy()) {
// A pointer/vector of pointer - use inttoptr.
- assert(OrigTy->getScalarType()->getPrimitiveSizeInBits() ==
+ assert(V->getType()->getScalarType()->getPrimitiveSizeInBits() ==
DL.getPointerSizeInBits(cast<PointerType>(EltTy)->getAddressSpace())
&& "Pointer type not same size!");
return Builder.CreateIntToPtr(V, Ty);
More information about the llvm-commits
mailing list