summaryrefslogtreecommitdiffstats
path: root/llvm/test/Assembler/thinlto-bad-summary2.ll
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2018-05-26 02:34:13 +0000
committerTeresa Johnson <tejohnson@google.com>2018-05-26 02:34:13 +0000
commit08d5b4ef0d0839761e3b7546efcd3ee0454742ea (patch)
tree1962452dfea56ccff172d7612ec1a8c982de27e2 /llvm/test/Assembler/thinlto-bad-summary2.ll
parentffebfe10c1cfc2eae92ddd0dc1b212595ac47864 (diff)
downloadbcm5719-llvm-08d5b4ef0d0839761e3b7546efcd3ee0454742ea.tar.gz
bcm5719-llvm-08d5b4ef0d0839761e3b7546efcd3ee0454742ea.zip
[ThinLTO] Print module summary index to assembly
Summary: Implements AsmWriter support for printing the module summary index to assembly with the format discussed in the RFC "LLVM Assembly format for ThinLTO Summary". Implements just enough of the parsing support to recognize and ignore the summary entries. As agreed in the RFC thread, this will be the behavior when assembling the IR. A follow on change will implement parsing/assembling of the summary entries for use by tools that currently build the summary index from bitcode. Reviewers: dexonsmith, pcc Subscribers: inglorion, eraman, steven_wu, dblaikie, llvm-commits Differential Revision: https://reviews.llvm.org/D46699 llvm-svn: 333335
Diffstat (limited to 'llvm/test/Assembler/thinlto-bad-summary2.ll')
-rw-r--r--llvm/test/Assembler/thinlto-bad-summary2.ll18
1 files changed, 18 insertions, 0 deletions
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: )(
OpenPOWER on IntegriCloud