[llvm-commits] [llvm] r58957 - /llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Chris Lattner
sabre at nondot.org
Sun Nov 9 19:05:41 PST 2008
Author: lattner
Date: Sun Nov 9 21:05:41 2008
New Revision: 58957
URL: http://llvm.org/viewvc/llvm-project?rev=58957&view=rev
Log:
move some cases around to silence these sorts of warnings in
release-asserts build:
llvm/CodeGen/SelectionDAGNodes.h:1298: warning: control may reach end of non-void function 'unsigned int llvm::MVT::getSizeInBits() const' being inlined
what an unhelpful warning.
Modified:
llvm/trunk/include/llvm/CodeGen/ValueTypes.h
Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=58957&r1=58956&r2=58957&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
+++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Sun Nov 9 21:05:41 2008
@@ -349,6 +349,12 @@
/// getSizeInBits - Return the size of the specified value type in bits.
unsigned getSizeInBits() const {
switch (V) {
+ case iPTR:
+ assert(0 && "Value type size is target-dependent. Ask TLI.");
+ case iPTRAny:
+ case iAny:
+ case fAny:
+ assert(0 && "Value type is overloaded.");
default:
return getExtendedSizeInBits();
case i1 : return 1;
@@ -375,12 +381,6 @@
case v2i64:
case v4f32:
case v2f64: return 128;
- case iPTR:
- assert(false && "Value type size is target-dependent. Ask TLI.");
- case iPTRAny:
- case iAny:
- case fAny:
- assert(false && "Value type is overloaded.");
}
}
More information about the llvm-commits
mailing list