summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/thinlto-backend-option.ll
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2017-04-19 20:08:21 +0000
committerDavid Blaikie <dblaikie@gmail.com>2017-04-19 20:08:21 +0000
commit6e2ec5f10ecca4db786cb5d2c3c4f1701a940385 (patch)
tree8197ed0a27b15525a1f4f9831edb5c8cea8b13da /clang/test/CodeGen/thinlto-backend-option.ll
parentcfe5b2bf749287ff27e921c887bb4754ba9eb951 (diff)
downloadbcm5719-llvm-6e2ec5f10ecca4db786cb5d2c3c4f1701a940385.tar.gz
bcm5719-llvm-6e2ec5f10ecca4db786cb5d2c3c4f1701a940385.zip
Parse backend options during thinlto backend compile actions
llvm-svn: 300741
Diffstat (limited to 'clang/test/CodeGen/thinlto-backend-option.ll')
-rw-r--r--clang/test/CodeGen/thinlto-backend-option.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/thinlto-backend-option.ll b/clang/test/CodeGen/thinlto-backend-option.ll
new file mode 100644
index 00000000000..4c7c0ea3efc
--- /dev/null
+++ b/clang/test/CodeGen/thinlto-backend-option.ll
@@ -0,0 +1,13 @@
+; Test to ensure -backend-options work when invoking the ThinLTO backend path.
+
+; This test uses a non-existent backend option to test that backend options are
+; being parsed. While it's more important that the existing options are parsed
+; than that this error is produced, this provides a reliable way to test this
+; scenario independent of any particular backend options that may exist now or
+; in the future.
+
+; RUN: %clang -flto=thin -c -o %t.o %s
+; RUN: llvm-lto -thinlto -o %t %t.o
+; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -backend-option -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s
+
+; CHECK: clang: Unknown command line argument '-nonexistent'
OpenPOWER on IntegriCloud