mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
Parse and record the gnu_unique_object type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118980 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ce8ca9ab0c
commit
e13a0ff8ac
@ -26,6 +26,7 @@ enum MCSymbolAttr {
|
||||
MCSA_ELF_TypeTLS, ///< .type _foo, STT_TLS # aka @tls_object
|
||||
MCSA_ELF_TypeCommon, ///< .type _foo, STT_COMMON # aka @common
|
||||
MCSA_ELF_TypeNoType, ///< .type _foo, STT_NOTYPE # aka @notype
|
||||
MCSA_ELF_TypeGnuUniqueObject, /// .type _foo, @gnu_unique_object
|
||||
MCSA_Global, ///< .globl
|
||||
MCSA_Hidden, ///< .hidden (ELF)
|
||||
MCSA_IndirectSymbol, ///< .indirect_symbol (MachO)
|
||||
|
@ -206,6 +206,7 @@ void MCMachOStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
|
||||
case MCSA_ELF_TypeTLS:
|
||||
case MCSA_ELF_TypeCommon:
|
||||
case MCSA_ELF_TypeNoType:
|
||||
case MCSA_ELF_TypeGnuUniqueObject:
|
||||
case MCSA_IndirectSymbol:
|
||||
case MCSA_Hidden:
|
||||
case MCSA_Internal:
|
||||
|
@ -370,6 +370,7 @@ bool ELFAsmParser::ParseDirectiveType(StringRef, SMLoc) {
|
||||
.Case("tls_object", MCSA_ELF_TypeTLS)
|
||||
.Case("common", MCSA_ELF_TypeCommon)
|
||||
.Case("notype", MCSA_ELF_TypeNoType)
|
||||
.Case("gnu_unique_object", MCSA_ELF_TypeGnuUniqueObject)
|
||||
.Default(MCSA_Invalid);
|
||||
|
||||
if (Attr == MCSA_Invalid)
|
||||
|
@ -9,6 +9,9 @@ foo:
|
||||
.type bar,@object
|
||||
bar:
|
||||
|
||||
// Test that gnu_unique_object is accepted.
|
||||
.type zed,@gnu_unique_object
|
||||
|
||||
// CHECK: # Symbol 0x00000004
|
||||
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
|
||||
// CHECK-NEXT: ('st_bind', 0x00000001)
|
||||
|
Loading…
Reference in New Issue
Block a user