summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Bitcode/upgrade-linker-options.ll15
-rw-r--r--llvm/test/DebugInfo/COFF/array-odr-violation.ll6
-rw-r--r--llvm/test/DebugInfo/COFF/inlining-same-name.ll3
-rw-r--r--llvm/test/LTO/Resolution/X86/symtab-elf.ll4
-rw-r--r--llvm/test/LTO/Resolution/X86/symtab.ll4
-rw-r--r--llvm/test/MC/COFF/cv-compiler-info.ll6
-rw-r--r--llvm/test/MC/COFF/linker-options.ll8
-rw-r--r--llvm/test/MC/MachO/linker-options.ll7
8 files changed, 31 insertions, 22 deletions
diff --git a/llvm/test/Bitcode/upgrade-linker-options.ll b/llvm/test/Bitcode/upgrade-linker-options.ll
new file mode 100644
index 00000000000..6c874fa81e6
--- /dev/null
+++ b/llvm/test/Bitcode/upgrade-linker-options.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as -disable-verify < %s | llvm-dis | FileCheck %s
+; RUN: not llvm-as < %s 2>&1 | FileCheck --check-prefix=ERROR %s
+
+; CHECK: !llvm.linker.options = !{!2, !3}
+; CHECK: !2 = !{!"/DEFAULTLIB:libcmtd.lib"}
+; CHECK: !3 = !{!"/DEFAULTLIB:oldnames.lib"}
+
+; ERROR: 'Linker Options' named metadata no longer supported
+
+!0 = !{i32 6, !"Linker Options", !1}
+!1 = !{!2, !3}
+!2 = !{!"/DEFAULTLIB:libcmtd.lib"}
+!3 = !{!"/DEFAULTLIB:oldnames.lib"}
+
+!llvm.module.flags = !{!0}
diff --git a/llvm/test/DebugInfo/COFF/array-odr-violation.ll b/llvm/test/DebugInfo/COFF/array-odr-violation.ll
index 471c18f00af..1041a90f034 100644
--- a/llvm/test/DebugInfo/COFF/array-odr-violation.ll
+++ b/llvm/test/DebugInfo/COFF/array-odr-violation.ll
@@ -65,7 +65,7 @@ attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!2, !11}
!llvm.ident = !{!13, !13}
-!llvm.module.flags = !{!14, !18, !19, !20}
+!llvm.module.flags = !{!18, !19, !20}
!0 = !DIGlobalVariableExpression(var: !1)
!1 = distinct !DIGlobalVariable(name: "a", linkageName: "\01?a@@3TYYSTYPE@@A", scope: !2, file: !3, line: 2, type: !6, isLocal: false, isDefinition: true)
@@ -81,10 +81,6 @@ attributes #1 = { nounwind readnone }
!11 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !12, producer: "clang version 5.0.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !4)
!12 = !DIFile(filename: "b.cpp", directory: "C:\5Csrc\5Cllvm-project\5Cbuild", checksumkind: CSK_MD5, checksum: "9cfd390d8827beab36769147bb037abc")
!13 = !{!"clang version 5.0.0 "}
-!14 = !{i32 6, !"Linker Options", !15}
-!15 = !{!16, !17}
-!16 = !{!"/DEFAULTLIB:libcmt.lib"}
-!17 = !{!"/DEFAULTLIB:oldnames.lib"}
!18 = !{i32 2, !"CodeView", i32 1}
!19 = !{i32 2, !"Debug Info Version", i32 3}
!20 = !{i32 1, !"PIC Level", i32 2}
diff --git a/llvm/test/DebugInfo/COFF/inlining-same-name.ll b/llvm/test/DebugInfo/COFF/inlining-same-name.ll
index fda5a6dc6ff..4a9c9924135 100644
--- a/llvm/test/DebugInfo/COFF/inlining-same-name.ll
+++ b/llvm/test/DebugInfo/COFF/inlining-same-name.ll
@@ -39,12 +39,11 @@ define void @main(i32* %i.i) !dbg !16 {
ret void
}
-!llvm.module.flags = !{!0, !1, !2}
+!llvm.module.flags = !{!0, !1}
!llvm.dbg.cu = !{!4}
!0 = !{i32 2, !"CodeView", i32 1}
!1 = !{i32 2, !"Debug Info Version", i32 3}
-!2 = !{i32 6, !"Linker Options", !{}}
!4 = distinct !DICompileUnit(language: DW_LANG_D, file: !5, producer: "LDC (http://wiki.dlang.org/LDC)", isOptimized: false, runtimeVersion: 1, emissionKind: FullDebug)
!5 = !DIFile(filename: "opover2.d", directory: "C:\5CLDC\5Cninja-ldc\5C..\5Cldc\5Ctests\5Cd2\5Cdmd-testsuite\5Crunnable")
!6 = !DILocation(line: 302, column: 9, scope: !7, inlinedAt: !15)
diff --git a/llvm/test/LTO/Resolution/X86/symtab-elf.ll b/llvm/test/LTO/Resolution/X86/symtab-elf.ll
index 1683b061c6d..d5f0fbe3700 100644
--- a/llvm/test/LTO/Resolution/X86/symtab-elf.ll
+++ b/llvm/test/LTO/Resolution/X86/symtab-elf.ll
@@ -6,8 +6,8 @@ target triple = "x86_64-unknown-linux-gnu"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; CHECK-NOT: linker opts:
-!0 = !{i32 6, !"Linker Options", !{!{!"/include:foo"}}}
-!llvm.module.flags = !{ !0 }
+!0 = !{!"/include:foo"}
+!llvm.linker.options = !{ !0 }
@g1 = global i32 0
diff --git a/llvm/test/LTO/Resolution/X86/symtab.ll b/llvm/test/LTO/Resolution/X86/symtab.ll
index b7bc1174901..fecea0a1e7b 100644
--- a/llvm/test/LTO/Resolution/X86/symtab.ll
+++ b/llvm/test/LTO/Resolution/X86/symtab.ll
@@ -9,8 +9,8 @@ target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
source_filename = "src.c"
; CHECK: linker opts: /include:foo
-!0 = !{i32 6, !"Linker Options", !{!{!"/include:foo"}}}
-!llvm.module.flags = !{ !0 }
+!0 = !{!"/include:foo"}
+!llvm.linker.options = !{ !0 }
; CHECK: D------X _fun
define i32 @fun() {
diff --git a/llvm/test/MC/COFF/cv-compiler-info.ll b/llvm/test/MC/COFF/cv-compiler-info.ll
index 6c33a25c1f4..f7cd17397d6 100644
--- a/llvm/test/MC/COFF/cv-compiler-info.ll
+++ b/llvm/test/MC/COFF/cv-compiler-info.ll
@@ -13,7 +13,7 @@ entry:
attributes #0 = { nounwind sspstrong "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="pentium4" "target-features"="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!3, !7, !8}
+!llvm.module.flags = !{!7, !8}
!llvm.ident = !{!9}
!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "clang version 4.0.0 ", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
@@ -35,10 +35,6 @@ attributes #0 = { nounwind sspstrong "correctly-rounded-divide-sqrt-fp-math"="fa
; CHECK-NOT: .short 4412 # Record kind: S_COMPILE3
!1 = !DIFile(filename: "D:\5Csrc\5Cscopes\5Cfoo.cpp", directory: "D:\5Csrc\5Cscopes\5Cclang")
!2 = !{}
-!3 = !{i32 6, !"Linker Options", !4}
-!4 = !{!5, !6}
-!5 = !{!"/DEFAULTLIB:libcmtd.lib"}
-!6 = !{!"/DEFAULTLIB:oldnames.lib"}
!7 = !{i32 2, !"CodeView", i32 1}
!8 = !{i32 2, !"Debug Info Version", i32 3}
!9 = !{!"clang version 4.0.0 "}
diff --git a/llvm/test/MC/COFF/linker-options.ll b/llvm/test/MC/COFF/linker-options.ll
index afc55af692d..24ac84da1e2 100644
--- a/llvm/test/MC/COFF/linker-options.ll
+++ b/llvm/test/MC/COFF/linker-options.ll
@@ -1,8 +1,10 @@
; RUN: llc -O0 -mtriple=i386-pc-win32 -filetype=asm -o - %s | FileCheck %s
-!0 = !{i32 6, !"Linker Options", !{!{!"/DEFAULTLIB:msvcrt.lib"}, !{!"/DEFAULTLIB:msvcrt.lib", !"/DEFAULTLIB:secur32.lib"}, !{!"/DEFAULTLIB:\22C:\5Cpath to\5Casan_rt.lib\22"}, !{!"\22/with spaces\22"}}}
-
-!llvm.module.flags = !{ !0 }
+!0 = !{!"/DEFAULTLIB:msvcrt.lib"}
+!1 = !{!"/DEFAULTLIB:msvcrt.lib", !"/DEFAULTLIB:secur32.lib"}
+!2 = !{!"/DEFAULTLIB:\22C:\5Cpath to\5Casan_rt.lib\22"}
+!3 = !{!"\22/with spaces\22"}
+!llvm.linker.options = !{!0, !1, !2, !3}
define dllexport void @foo() {
ret void
diff --git a/llvm/test/MC/MachO/linker-options.ll b/llvm/test/MC/MachO/linker-options.ll
index 09ebd0f9156..d9d7a4a46d8 100644
--- a/llvm/test/MC/MachO/linker-options.ll
+++ b/llvm/test/MC/MachO/linker-options.ll
@@ -27,6 +27,7 @@
; CHECK-OBJ: ]
; CHECK-OBJ: }
-!0 = !{i32 6, !"Linker Options", !{!{!"-lz"}, !{!"-framework", !"Cocoa"}, !{!"-lmath"}}}
-
-!llvm.module.flags = !{ !0 }
+!0 = !{!"-lz"}
+!1 = !{!"-framework", !"Cocoa"}
+!2 = !{!"-lmath"}
+!llvm.linker.options = !{!0, !1, !2}
OpenPOWER on IntegriCloud