blob: 78fe3c5458fdb972cfa685f9d96f144798be9160 [file] [log] [blame]
Sam Cleggcfd44a22018-04-05 17:01:39 +00001; RUN: llc < %s -asm-verbose=false | FileCheck %s
2
3; Test the mechanism for defining user custom sections.
4
5target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
Sam Clegga5908002018-05-10 17:49:11 +00006target triple = "wasm32-unknown-unknown"
Sam Cleggcfd44a22018-04-05 17:01:39 +00007
8!0 = !{ !"red", !"foo" }
9!1 = !{ !"green", !"bar" }
10!2 = !{ !"green", !"qux" }
11!wasm.custom_sections = !{ !0, !1, !2 }
12
Thomas Livelycbda16e2019-01-17 02:29:55 +000013!llvm.ident = !{!3}
14!3 = !{!"clang version 123"}
15
Thomas Livelyc6795e02019-01-18 02:47:48 +000016!llvm.module.flags = !{!4}
17!4 = !{i32 2, !"Debug Info Version", i32 3}
18
19!llvm.dbg.cu = !{!5}
20!5 = distinct !DICompileUnit(language: DW_LANG_C99, file: !6)
21!6 = !DIFile(filename: "test", directory: "testdir")
22
Sam Cleggcfd44a22018-04-05 17:01:39 +000023; CHECK: .section .custom_section.red,"",@
24; CHECK-NEXT: .ascii "foo"
25
26; CHECK: .section .custom_section.green,"",@
27; CHECK-NEXT: .ascii "bar"
28
29; CHECK: .section .custom_section.green,"",@
30; CHECK-NEXT: .ascii "qux"
Thomas Livelycbda16e2019-01-17 02:29:55 +000031
32; CHECK: .section .custom_section.producers,"",@
Thomas Livelyc6795e02019-01-18 02:47:48 +000033; CHECK-NEXT: .int8 2
34; CHECK-NEXT: .int8 8
35; CHECK-NEXT: .ascii "language"
Thomas Livelycbda16e2019-01-17 02:29:55 +000036; CHECK-NEXT: .int8 1
Thomas Livelyc6795e02019-01-18 02:47:48 +000037; CHECK-NEXT: .int8 3
38; CHECK-NEXT: .ascii "C99"
39; CHECK-NEXT: .int8 0
Thomas Livelycbda16e2019-01-17 02:29:55 +000040; CHECK-NEXT: .int8 12
41; CHECK-NEXT: .ascii "processed-by"
42; CHECK-NEXT: .int8 1
43; CHECK-NEXT: .int8 5
44; CHECK-NEXT: .ascii "clang"
45; CHECK-NEXT: .int8 3
46; CHECK-NEXT: .ascii "123"