[llvm-commits] [llvm] r142318 - in /llvm/trunk: include/llvm/Object/ObjectFile.h lib/Object/ELFObjectFile.cpp

Michael J. Spencer bigcheesegs at gmail.com
Mon Oct 17 16:55:06 PDT 2011


Author: mspencer
Date: Mon Oct 17 18:55:06 2011
New Revision: 142318

URL: http://llvm.org/viewvc/llvm-project?rev=142318&view=rev
Log:
Object: Add some types to SymbolRef::Type.

Some of these can be true at the same time and there are a lot to add,
so this should be turned into a bitfield. Some of the other accessors
should probably be folded into this.

Modified:
    llvm/trunk/include/llvm/Object/ObjectFile.h
    llvm/trunk/lib/Object/ELFObjectFile.cpp

Modified: llvm/trunk/include/llvm/Object/ObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ObjectFile.h?rev=142318&r1=142317&r2=142318&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ObjectFile.h Mon Oct 17 18:55:06 2011
@@ -166,9 +166,11 @@
   }
 
   enum Type {
-    ST_Function,
     ST_Data,
+    ST_Debug,
     ST_External,    // Defined in another object file
+    ST_File,
+    ST_Function,
     ST_Other
   };
 

Modified: llvm/trunk/lib/Object/ELFObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ELFObjectFile.cpp?rev=142318&r1=142317&r2=142318&view=diff
==============================================================================
--- llvm/trunk/lib/Object/ELFObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/ELFObjectFile.cpp Mon Oct 17 18:55:06 2011
@@ -621,6 +621,12 @@
   }
 
   switch (symb->getType()) {
+  case ELF::STT_SECTION:
+    Result = SymbolRef::ST_Debug;
+    break;
+  case ELF::STT_FILE:
+    Result = SymbolRef::ST_File;
+    break;
   case ELF::STT_FUNC:
     Result = SymbolRef::ST_Function;
     break;





More information about the llvm-commits mailing list