mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-05 10:17:37 +00:00
MCStreamer: Add a few more "symbol attributes".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74077 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f5e75a1fa9
commit
d814b21509
@ -23,9 +23,21 @@ namespace llvm {
|
||||
class MCStreamer {
|
||||
public:
|
||||
enum SymbolAttr {
|
||||
Global,
|
||||
Weak,
|
||||
PrivateExtern
|
||||
Global, /// .globl
|
||||
Hidden, /// .hidden (ELF)
|
||||
IndirectSymbol, /// .indirect_symbol (Apple)
|
||||
Internal, /// .internal (ELF)
|
||||
LazyReference, /// .lazy_reference (Apple)
|
||||
NoDeadStrip, /// .no_dead_strip (Apple)
|
||||
PrivateExtern, /// .private_extern (Apple)
|
||||
Protected, /// .protected (ELF)
|
||||
Reference, /// .reference (Apple)
|
||||
Weak, /// .weak
|
||||
WeakDefinition, /// .weak_definition (Apple)
|
||||
WeakReference, /// .weak_reference (Apple)
|
||||
|
||||
SymbolAttrFirst = Global,
|
||||
SymbolAttrLast = WeakReference
|
||||
};
|
||||
|
||||
private:
|
||||
|
@ -102,8 +102,17 @@ void MCAsmStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
||||
SymbolAttr Attribute) {
|
||||
switch (Attribute) {
|
||||
case Global: OS << ".globl"; break;
|
||||
case Weak: OS << ".weak"; break;
|
||||
case Hidden: OS << ".hidden"; break;
|
||||
case IndirectSymbol: OS << ".indirect_symbol"; break;
|
||||
case Internal: OS << ".internal"; break;
|
||||
case LazyReference: OS << ".lazy_reference"; break;
|
||||
case NoDeadStrip: OS << ".no_dead_strip"; break;
|
||||
case PrivateExtern: OS << ".private_extern"; break;
|
||||
case Protected: OS << ".protected"; break;
|
||||
case Reference: OS << ".reference"; break;
|
||||
case Weak: OS << ".weak"; break;
|
||||
case WeakDefinition: OS << ".weak_definition"; break;
|
||||
case WeakReference: OS << ".weak_reference"; break;
|
||||
}
|
||||
|
||||
OS << ' ' << Symbol->getName() << '\n';
|
||||
|
Loading…
Reference in New Issue
Block a user