[PATCH] D43116: [ELF] Print the .type assembly directive correctly for STT_NOTYPE

Oliver Stannard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 9 05:36:47 PST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL324731: [ELF] Print the .type assembly directive correctly for STT_NOTYPE (authored by olista01, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D43116?vs=133585&id=133592#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D43116

Files:
  llvm/trunk/lib/MC/MCAsmStreamer.cpp
  llvm/trunk/test/MC/ARM/type-directive-print.ll


Index: llvm/trunk/lib/MC/MCAsmStreamer.cpp
===================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp
@@ -565,7 +565,7 @@
     case MCSA_ELF_TypeObject:      OS << "object"; break;
     case MCSA_ELF_TypeTLS:         OS << "tls_object"; break;
     case MCSA_ELF_TypeCommon:      OS << "common"; break;
-    case MCSA_ELF_TypeNoType:      OS << "no_type"; break;
+    case MCSA_ELF_TypeNoType:      OS << "notype"; break;
     case MCSA_ELF_TypeGnuUniqueObject: OS << "gnu_unique_object"; break;
     }
     EmitEOL();
Index: llvm/trunk/test/MC/ARM/type-directive-print.ll
===================================================================
--- llvm/trunk/test/MC/ARM/type-directive-print.ll
+++ llvm/trunk/test/MC/ARM/type-directive-print.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=armv7a | FileCheck %s
+
+module asm ".type test_notype, %notype"
+module asm ".type test_function, %function"
+module asm ".type test_object, %object"
+module asm ".type test_common, %common"
+module asm ".type test_tls_object, %tls_object"
+module asm ".type test_gnu_indirect_function, %gnu_indirect_function"
+module asm ".type test_gnu_unique_object, %gnu_unique_object"
+
+; CHECK: .type test_notype,%notype
+; CHECK: .type test_function,%function
+; CHECK: .type test_object,%object
+; CHECK: .type test_common,%common
+; CHECK: .type test_tls_object,%tls_object
+; CHECK: .type test_gnu_indirect_function,%gnu_indirect_function
+; CHECK: .type test_gnu_unique_object,%gnu_unique_object


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43116.133592.patch
Type: text/x-patch
Size: 1568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180209/0166eaee/attachment.bin>


More information about the llvm-commits mailing list