diff --git a/clang/test/Driver/native-llvm.c b/clang/test/Driver/native-llvm.c new file mode 100644 index 0000000000000..c9543b855bc76 --- /dev/null +++ b/clang/test/Driver/native-llvm.c @@ -0,0 +1,5 @@ +// Check that clang reports an error message if -flto without -c is used +// on a toolchain that is not expecting it (HasNativeLLVMSupport() is false). + +// RUN: %clang -### -flto -target x86_64-unknown-unknown %s 2>&1 | FileCheck %s +// CHECK: error: {{.*}} unable to pass LLVM bit-code files to linker