diff options
Diffstat (limited to 'llvm/test/Assembler')
| -rw-r--r-- | llvm/test/Assembler/thinlto-bad-summary1.ll | 18 | ||||
| -rw-r--r-- | llvm/test/Assembler/thinlto-bad-summary2.ll | 18 | ||||
| -rw-r--r-- | llvm/test/Assembler/thinlto-bad-summary3.ll | 19 |
3 files changed, 55 insertions, 0 deletions
diff --git a/llvm/test/Assembler/thinlto-bad-summary1.ll b/llvm/test/Assembler/thinlto-bad-summary1.ll new file mode 100644 index 00000000000..394506317d9 --- /dev/null +++ b/llvm/test/Assembler/thinlto-bad-summary1.ll @@ -0,0 +1,18 @@ +; Test that we get appropriate error when parsing summary with a missing +; summary type label. +; RUN: not llvm-as %s 2>&1 | FileCheck %s + +; CHECK: error: expected 'label' at start of summary entry + +; ModuleID = 'thinlto-function-summary-callgraph.ll' +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +; Function Attrs: nounwind uwtable +define i32 @main() #0 { +entry: + ret i32 1 +} + +^0 = module: (path: "{{.*}}/test/Assembler/thinlto-bad-summary1.ll", hash: (0, 0, 0, 0, 0)) +^1 = () diff --git a/llvm/test/Assembler/thinlto-bad-summary2.ll b/llvm/test/Assembler/thinlto-bad-summary2.ll new file mode 100644 index 00000000000..b736c101adc --- /dev/null +++ b/llvm/test/Assembler/thinlto-bad-summary2.ll @@ -0,0 +1,18 @@ +; Test that we get appropriate error when parsing summary that doesn't +; have a '(' after the summary type label. +; RUN: not llvm-as %s 2>&1 | FileCheck %s + +; CHECK: error: expected '(' at start of summary entry + +; ModuleID = 'thinlto-function-summary-callgraph.ll' +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +; Function Attrs: nounwind uwtable +define i32 @main() #0 { +entry: + ret i32 1 +} + +^0 = module: (path: "{{.*}}/test/Assembler/thinlto-bad-summary1.ll", hash: (0, 0, 0, 0, 0)) +^1 = gv: )( diff --git a/llvm/test/Assembler/thinlto-bad-summary3.ll b/llvm/test/Assembler/thinlto-bad-summary3.ll new file mode 100644 index 00000000000..1855a3d4dd8 --- /dev/null +++ b/llvm/test/Assembler/thinlto-bad-summary3.ll @@ -0,0 +1,19 @@ +; Test that we get appropriate error when parsing summary with unbalanced +; parentheses. +; RUN: not llvm-as %s 2>&1 | FileCheck %s + +; CHECK: error: found end of file while parsing summary entry + +; ModuleID = 'thinlto-function-summary-callgraph.ll' +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +; Function Attrs: nounwind uwtable +define i32 @main() #0 { +entry: + ret i32 1 +} + +^0 = module: (path: "{{.*}}/test/Assembler/thinlto-bad-summary1.ll", hash: (0, 0, 0, 0, 0)) +; Missing a ')' +^1 = gv: (name: "main", summaries: (function: (module: ^0, flags: (linkage: external, notEligibleToImport: 0, live: 0, dsoLocal: 0), insts: 1)) ; guid = 15822663052811949562 |

