forked from OSchip/llvm-project
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. llvm-svn: 142318
This commit is contained in:
parent
321731539e
commit
1d19f97ea5
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -621,6 +621,12 @@ error_code ELFObjectFile<target_endianness, is64Bits>
|
|||
}
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue