[cfe-commits] r57392 - in /cfe/trunk/lib/CodeGen: CGExprConstant.cpp CGObjC.cpp CGStmt.cpp CodeGenTypes.cpp
Chris Lattner
sabre at nondot.org
Sat Oct 11 17:31:50 PDT 2008
Author: lattner
Date: Sat Oct 11 19:31:50 2008
New Revision: 57392
URL: http://llvm.org/viewvc/llvm-project?rev=57392&view=rev
Log:
silence release-assert warnings.
Modified:
cfe/trunk/lib/CodeGen/CGExprConstant.cpp
cfe/trunk/lib/CodeGen/CGObjC.cpp
cfe/trunk/lib/CodeGen/CGStmt.cpp
cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=57392&r1=57391&r2=57392&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Sat Oct 11 19:31:50 2008
@@ -695,8 +695,8 @@
// A scalar source can be splatted to a vector of the same element type
if (isa<llvm::VectorType>(DstTy) && !isa<VectorType>(SrcType)) {
- const llvm::VectorType *VT = cast<llvm::VectorType>(DstTy);
- assert((VT->getElementType() == Src->getType()) &&
+ assert((cast<llvm::VectorType>(DstTy)->getElementType()
+ == Src->getType()) &&
"Vector element type must match scalar type to splat.");
unsigned NumElements = DstType->getAsVectorType()->getNumElements();
llvm::SmallVector<llvm::Constant*, 16> Elements;
Modified: cfe/trunk/lib/CodeGen/CGObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGObjC.cpp?rev=57392&r1=57391&r2=57392&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGObjC.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGObjC.cpp Sat Oct 11 19:31:50 2008
@@ -72,9 +72,9 @@
}
isClassMessage = true;
- } else if (const PredefinedExpr *PDE =
- dyn_cast<PredefinedExpr>(E->getReceiver())) {
- assert(PDE->getIdentType() == PredefinedExpr::ObjCSuper);
+ } else if (isa<PredefinedExpr>(E->getReceiver())) {
+ assert(cast<PredefinedExpr>(E->getReceiver())->getIdentType() ==
+ PredefinedExpr::ObjCSuper);
isSuperMessage = true;
Receiver = LoadObjCSelf();
} else {
Modified: cfe/trunk/lib/CodeGen/CGStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGStmt.cpp?rev=57392&r1=57391&r2=57392&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGStmt.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGStmt.cpp Sat Oct 11 19:31:50 2008
@@ -761,7 +761,7 @@
TargetInfo::ConstraintInfo Info;
bool result = Target.validateOutputConstraint(OutputConstraint.c_str(),
Info);
- assert(result && "Failed to parse output constraint");
+ assert(result && "Failed to parse output constraint"); result=result;
// Simplify the output constraint.
OutputConstraint = SimplifyConstraint(OutputConstraint.c_str() + 1, Target);
@@ -821,9 +821,8 @@
TargetInfo::ConstraintInfo Info;
bool result = Target.validateInputConstraint(InputConstraint.c_str(),
- NumConstraints,
- Info);
- assert(result && "Failed to parse input constraint");
+ NumConstraints, Info);
+ assert(result && "Failed to parse input constraint"); result=result;
if (i != 0 || S.getNumOutputs() > 0)
Constraints += ',';
Modified: cfe/trunk/lib/CodeGen/CodeGenTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTypes.cpp?rev=57392&r1=57391&r2=57392&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTypes.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTypes.cpp Sat Oct 11 19:31:50 2008
@@ -405,6 +405,7 @@
}
} else {
assert(0 && "FIXME: Unknown tag decl kind!");
+ abort();
}
// Refine our Opaque type to ResultType. This can invalidate ResultType, so
@@ -487,8 +488,9 @@
llvm::APSInt FieldSize(32);
bool isBitField =
BitWidth->isIntegerConstantExpr(FieldSize, CGT.getContext());
- assert (isBitField && "Invalid BitField size expression");
- uint64_t BitFieldSize = FieldSize.getZExtValue();
+ assert(isBitField && "Invalid BitField size expression");
+ isBitField=isBitField; // silence warning.
+ uint64_t BitFieldSize = FieldSize.getZExtValue();
// Bitfield field info is different from other field info;
// it actually ignores the underlying LLVM struct because
More information about the cfe-commits
mailing list