1 // REQUIRES: x86-registered-target
2 // REQUIRES: shell
3 
4 // NOTE: -fno-integrated-cc1 has been added to work around an ASAN failure
5 //       caused by in-process cc1 invocation. Clang InterfaceStubs is not the
6 //       culprit, but Clang Interface Stubs' Driver pipeline setup uncovers an
7 //       existing ASAN issue when invoking multiple normal cc1 jobs along with
8 //       multiple Clang Interface Stubs cc1 jobs together.
9 //       There is currently a discussion of this going on at:
10 //         https://reviews.llvm.org/D69825
11 // RUN: mkdir -p %t; cd %t
12 // RUN: %clang -target x86_64-unknown-linux-gnu -c -emit-interface-stubs \
13 // RUN:   -fno-integrated-cc1 \
14 // RUN:   %s %S/object.c %S/weak.cpp
15 // RUN: %clang -emit-interface-stubs -emit-merged-ifs \
16 // RUN:   -fno-integrated-cc1 \
17 // RUN:   %t/driver-test2.o %t/object.o %t/weak.o -S -o - 2>&1 | FileCheck %s
18 
19 // CHECK-DAG: data
20 // CHECK-DAG: bar
21 // CHECK-DAG: strongFunc
22 // CHECK-DAG: weakFunc
23 
bar(int a)24 int bar(int a) { return a; }
main()25 int main() { return 0; }
26