summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-04-30 06:14:25 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-04-30 06:14:25 +0000
commit0aca1c30c691bcf8fbe9d112210cad3052e22708 (patch)
treeab893ccc031891aab65c4b8d8ef5e58550455530 /llvm/test
parent948dfbf3c45b9fefbde91910f13f932be8ebfac2 (diff)
downloadbcm5719-llvm-0aca1c30c691bcf8fbe9d112210cad3052e22708.tar.gz
bcm5719-llvm-0aca1c30c691bcf8fbe9d112210cad3052e22708.zip
ARM: print COFF function header for Windows on ARM
Emit the COFF header when printing out the function. This is important as the header contains two important pieces of information: the storage class for the symbol and the symbol type information. This bit of information is required for the linker to correctly identify the type of symbol that it is dealing with. llvm-svn: 207613
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/ARM/coff-function-type-info.ll45
1 files changed, 45 insertions, 0 deletions
diff --git a/llvm/test/MC/ARM/coff-function-type-info.ll b/llvm/test/MC/ARM/coff-function-type-info.ll
new file mode 100644
index 00000000000..a9f7c186b63
--- /dev/null
+++ b/llvm/test/MC/ARM/coff-function-type-info.ll
@@ -0,0 +1,45 @@
+; RUN: llc -mtriple thumbv7-windows-itanium -filetype asm -o - %s \
+; RUN: | FileCheck %s -check-prefix CHECK-ASM
+
+; RUN: llc -mtriple thumbv7-windows-itanium -filetype obj -o - %s \
+; RUN: | llvm-readobj -t | FileCheck %s -check-prefix CHECK-OBJECT
+
+define arm_aapcs_vfpcc void @external() {
+entry:
+ ret void
+}
+
+; CHECK-ASM: .def external
+; CHECK-ASM: .scl 2
+; CHECK-ASM: .type 32
+; CHECK-ASM: .endef
+; CHECK-ASM: .globl external
+
+define internal arm_aapcs_vfpcc void @internal() {
+entry:
+ ret void
+}
+
+; CHECK-ASM: .def internal
+; CHECK-ASM: .scl 3
+; CHECK-ASM: .type 32
+; CHECK-ASM: .endef
+; CHECK-ASM-NOT: .globl internal
+
+; CHECK-OBJECT: Symbol {
+; CHECK-OBJECT: Name: external
+; CHECK-OBJECT: Section: .text
+; CHECK-OBJECT: BaseType: Null
+; CHECK-OBJECT: ComplexType: Function
+; CHECK-OBJECT: StorageClass: External
+; CHECK-OBJECT: AuxSymbolCount: 0
+; CHECK-OBJECT: }
+; CHECK-OBJECT: Symbol {
+; CHECK-OBJECT: Name: internal
+; CHECK-OBJECT: Section: .text
+; CHECK-OBJECT: BaseType: Null
+; CHECK-OBJECT: ComplexType: Function
+; CHECK-OBJECT: StorageClass: Static
+; CHECK-OBJECT: AuxSymbolCount: 0
+; CHECK-OBJECT: }
+
OpenPOWER on IntegriCloud