[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 03:35:41 PST 2018
olista01 updated this revision to Diff 133585.
olista01 added a comment.
Add a triple to the test.
Repository:
rL LLVM
https://reviews.llvm.org/D43116
Files:
lib/MC/MCAsmStreamer.cpp
test/MC/ARM/type-directive-print.ll
Index: test/MC/ARM/type-directive-print.ll
===================================================================
--- /dev/null
+++ test/MC/ARM/type-directive-print.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -triple=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, at notype
+; CHECK: .type test_function, at function
+; CHECK: .type test_object, at object
+; CHECK: .type test_common, at common
+; CHECK: .type test_tls_object, at tls_object
+; CHECK: .type test_gnu_indirect_function, at gnu_indirect_function
+; CHECK: .type test_gnu_unique_object, at gnu_unique_object
Index: lib/MC/MCAsmStreamer.cpp
===================================================================
--- lib/MC/MCAsmStreamer.cpp
+++ 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();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43116.133585.patch
Type: text/x-patch
Size: 1475 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180209/e09901bd/attachment.bin>
More information about the llvm-commits
mailing list