Produce an error when trying to link with -emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189193 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Driver/lto.c b/test/Driver/lto.c
index 511c19b..91524bf 100644
--- a/test/Driver/lto.c
+++ b/test/Driver/lto.c
@@ -18,3 +18,5 @@
 // RUN: %clang %s -flto -S -### 2> %t.log
 // RUN: grep '"-o" ".*lto\.s" "-x" "c" ".*lto\.c"' %t.log
 
+// RUN: not %clang %s -emit-llvm 2>&1 | FileCheck --check-prefix=LLVM-LINK %s
+// LLVM-LINK: -emit-llvm cannot be used when linking