[llvm-commits] [llvm-gcc-4.2] r86012 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Chris Lattner sabre at nondot.org
Tue Nov 3 22:24:41 PST 2009


Author: lattner
Date: Wed Nov  4 00:24:41 2009
New Revision: 86012

URL: http://llvm.org/viewvc/llvm-project?rev=86012&view=rev
Log:
tidy up

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-types.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=86012&r1=86011&r2=86012&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Wed Nov  4 00:24:41 2009
@@ -654,15 +654,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