[llvm-commits] [llvm] r118980 - in /llvm/trunk: include/llvm/MC/MCDirectives.h lib/MC/MCMachOStreamer.cpp lib/MC/MCParser/ELFAsmParser.cpp test/MC/ELF/type.s
Rafael Espindola
rafael.espindola at gmail.com
Fri Nov 12 20:51:02 PST 2010
Author: rafael
Date: Fri Nov 12 22:51:02 2010
New Revision: 118980
URL: http://llvm.org/viewvc/llvm-project?rev=118980&view=rev
Log:
Parse and record the gnu_unique_object type.
Modified:
llvm/trunk/include/llvm/MC/MCDirectives.h
llvm/trunk/lib/MC/MCMachOStreamer.cpp
llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
llvm/trunk/test/MC/ELF/type.s
Modified: llvm/trunk/include/llvm/MC/MCDirectives.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCDirectives.h?rev=118980&r1=118979&r2=118980&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCDirectives.h (original)
+++ llvm/trunk/include/llvm/MC/MCDirectives.h Fri Nov 12 22:51:02 2010
@@ -26,6 +26,7 @@
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)
Modified: llvm/trunk/lib/MC/MCMachOStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCMachOStreamer.cpp?rev=118980&r1=118979&r2=118980&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCMachOStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCMachOStreamer.cpp Fri Nov 12 22:51:02 2010
@@ -206,6 +206,7 @@
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:
Modified: llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp?rev=118980&r1=118979&r2=118980&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp (original)
+++ llvm/trunk/lib/MC/MCParser/ELFAsmParser.cpp Fri Nov 12 22:51:02 2010
@@ -370,6 +370,7 @@
.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)
Modified: llvm/trunk/test/MC/ELF/type.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/type.s?rev=118980&r1=118979&r2=118980&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/type.s (original)
+++ llvm/trunk/test/MC/ELF/type.s Fri Nov 12 22:51:02 2010
@@ -9,6 +9,9 @@
.type bar, at object
bar:
+// Test that gnu_unique_object is accepted.
+ .type zed, at gnu_unique_object
+
// CHECK: # Symbol 0x00000004
// CHECK-NEXT: (('st_name', 0x00000005) # 'bar'
// CHECK-NEXT: ('st_bind', 0x00000001)
More information about the llvm-commits
mailing list