From: Michael J. Spencer Date: Mon, 17 Oct 2011 23:55:06 +0000 (+0000) Subject: Object: Add some types to SymbolRef::Type. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=206d17cf605293f1c12d8bfa8cf72826a29b253f;p=oota-llvm.git 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142318 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index 5581225b53d..331ed7caa06 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -166,9 +166,11 @@ public: } enum Type { - ST_Function, ST_Data, + ST_Debug, ST_External, // Defined in another object file + ST_File, + ST_Function, ST_Other }; diff --git a/lib/Object/ELFObjectFile.cpp b/lib/Object/ELFObjectFile.cpp index a5e3910d16c..97ba9167a53 100644 --- a/lib/Object/ELFObjectFile.cpp +++ b/lib/Object/ELFObjectFile.cpp @@ -621,6 +621,12 @@ error_code ELFObjectFile } 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;