[llvm-commits] [dragonegg] r88780 - /dragonegg/trunk/llvm-types.cpp
Duncan Sands
baldrick at free.fr
Sat Nov 14 04:18:36 PST 2009
Author: baldrick
Date: Sat Nov 14 06:18:36 2009
New Revision: 88780
URL: http://llvm.org/viewvc/llvm-project?rev=88780&view=rev
Log:
Port commit 86012 (lattner) from llvm-gcc:
tidy up
Modified:
dragonegg/trunk/llvm-types.cpp
Modified: dragonegg/trunk/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/llvm-types.cpp?rev=88780&r1=88779&r2=88780&view=diff
==============================================================================
--- dragonegg/trunk/llvm-types.cpp (original)
+++ dragonegg/trunk/llvm-types.cpp Sat Nov 14 06:18:36 2009
@@ -609,15 +609,11 @@
/// GetFieldIndex - Returns the index of the LLVM field corresponding to
/// this FIELD_DECL, or ~0U if the type the field belongs to has not yet
/// been converted.
-unsigned int TypeConverter::GetFieldIndex(tree_node *field_decl) {
+unsigned int TypeConverter::GetFieldIndex(tree field_decl) {
assert(TREE_CODE(field_decl) == FIELD_DECL && "Not a FIELD_DECL!");
std::map<tree, unsigned int>::iterator I = FieldIndexMap.find(field_decl);
- if (I != FieldIndexMap.end()) {
- return I->second;
- } else {
- assert(false && "Type not laid out for LLVM?");
- return ~0U;
- }
+ assert(I != FieldIndexMap.end() && "Type not laid out for LLVM?");
+ return I->second;
}
/// SetFieldIndex - Set the index of the LLVM field corresponding to
More information about the llvm-commits
mailing list