Support Constant Pool Sections
[oota-llvm.git] / lib / CodeGen / ELF.h
index 28b6be8910e525a57ee8ad8444cf1b3e09771739..8d92373b713d38c3a8b631618108c47790b87dde 100644 (file)
@@ -144,6 +144,9 @@ namespace llvm {
     uint8_t Other;
     unsigned short SectionIdx;
 
+    // Symbol index into the Symbol table
+    unsigned SymTabIdx;
+
     enum { 
       STB_LOCAL = 0,
       STB_GLOBAL = 1,
@@ -168,7 +171,8 @@ namespace llvm {
     ELFSym(const GlobalValue *gv) : GV(gv), IsCommon(false), IsBss(false),
                                     IsConstant(false), NameIdx(0), Value(0),
                                     Size(0), Info(0), Other(STV_DEFAULT),
-                                    SectionIdx(ELFSection::SHN_UNDEF) {
+                                    SectionIdx(ELFSection::SHN_UNDEF),
+                                    SymTabIdx(0) {
       if (!GV)
         return;
 
@@ -191,6 +195,10 @@ namespace llvm {
       return (Info >> 4) & 0xf;
     }
 
+    unsigned getType() {
+      return Info & 0xf;
+    }
+
     void setBind(unsigned X) {
       assert(X == (X & 0xF) && "Bind value out of range!");
       Info = (Info & 0x0F) | (X << 4);