[clang][ifs] Clang Interface Stubs ToolChain plumbing.

This patch enables end to end support for generating ELF interface stubs
directly from clang. Now the following:

clang -emit-interface-stubs -o libfoo.so a.cpp b.cpp c.cpp

will product an ELF binary with visible symbols populated. Visibility attributes
and -fvisibility can be used to control what gets populated.

* Adding ToolChain support for clang Driver IFS Merge Phase
* Implementing a default InterfaceStubs Merge clang Tool, used by ToolChain
* Adds support for the clang Driver to involve llvm-ifs on ifs files.
* Adds -emit-merged-ifs flag, to tell llvm-ifs to emit a merged ifs text file
  instead of the final object format (normally ELF)


Differential Revision: https://reviews.llvm.org/D63978

llvm-svn: 373538
diff --git a/clang/test/InterfaceStubs/inline.c b/clang/test/InterfaceStubs/inline.c
index e32b4e1..06a58c4 100644
--- a/clang/test/InterfaceStubs/inline.c
+++ b/clang/test/InterfaceStubs/inline.c
@@ -1,37 +1,32 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang -DINLINE=inline -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-ifs-v1 -std=gnu89 -xc %s | \
+// RUN: %clang -c -DINLINE=inline -target x86_64-unknown-linux-gnu -o - \
+// RUN: -emit-interface-stubs -std=gnu89 -xc %s | \
 // RUN: FileCheck -check-prefix=CHECK-GNU %s
 // RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -O0 -o - -c \
 // RUN: -std=gnu89 -xc %s | llvm-nm - | FileCheck -check-prefix=CHECK-GNU %s
 
-// RUN: %clang -DINLINE="__attribute__((always_inline))" \
-// RUN: -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-ifs-v1 -xc %s | \
+// RUN: %clang -c -DINLINE="__attribute__((always_inline))" \
+// RUN: -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs -xc %s | \
 // RUN: FileCheck -check-prefix=CHECK-GNU %s
 // RUN: %clang -DINLINE="__attribute__((always_inline))" \
 // RUN: -target x86_64-linux-gnu -O0 -o - -c -xc %s | \
 // RUN: llvm-nm - | FileCheck -check-prefix=CHECK-GNU %s
 
-// RUN: %clang -DINLINE=inline -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-ifs-v1 -std=c99 -xc %s | \
+// RUN: %clang -c -DINLINE=inline -target x86_64-unknown-linux-gnu -o - \
+// RUN: -emit-interface-stubs -std=c99 -xc %s | \
 // RUN: FileCheck -check-prefix=CHECK-STD %s
 // RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -O0 -o - -c -std=c99 \
 // RUN: -xc %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-STD %s
 
-// RUN: %clang -DINLINE="__attribute__((noinline))" \
-// RUN: -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-ifs-v1 -std=c99 -xc %s | \
+// RUN: %clang -c -DINLINE="__attribute__((noinline))" \
+// RUN: -target x86_64-unknown-linux-gnu -o - -emit-interface-stubs -std=c99 -xc %s | \
 // RUN: FileCheck -check-prefix=CHECK-NOINLINE %s
 // RUN: %clang -DINLINE="__attribute__((noinline))" -target x86_64-linux-gnu \
 // RUN: -O0 -o - -c -std=c99 -xc %s | llvm-nm - 2>&1 | \
 // RUN: FileCheck -check-prefix=CHECK-NOINLINE %s
 
-// RUN: %clang -DINLINE="static" -target x86_64-unknown-linux-gnu -o - \
-// RUN: -emit-interface-stubs \
-// RUN: -interface-stub-version=experimental-ifs-v1 -std=c99 -xc %s | \
+// RUN: %clang -c -DINLINE="static" -target x86_64-unknown-linux-gnu -o - \
+// RUN: -emit-interface-stubs -std=c99 -xc %s | \
 // RUN: FileCheck -check-prefix=CHECK-STATIC %s
 // RUN: %clang -DINLINE="static" -target x86_64-linux-gnu -O0 -o - -c \
 // RUN: -std=c99 -xc %s | llvm-nm - 2>&1 | \
@@ -50,12 +45,12 @@
   return var;
 }
 
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -o - \
-// RUN: -emit-interface-stubs -interface-stub-version=experimental-ifs-v1 \
+// RUN: %clang -c -DINLINE=inline -target x86_64-linux-gnu -o - \
+// RUN: -emit-interface-stubs \
 // RUN: -std=gnu89 -xc %s | FileCheck -check-prefix=CHECK-TAPI %s
 
-// RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -o - \
-// RUN: -emit-interface-stubs -interface-stub-version=experimental-ifs-v1 \
+// RUN: %clang -c -DINLINE=inline -target x86_64-linux-gnu -o - \
+// RUN: -emit-interface-stubs \
 // RUN: -std=gnu89 -xc %s | FileCheck -check-prefix=CHECK-SYMBOLS %s
 // RUN: %clang -DINLINE=inline -target x86_64-linux-gnu -o - \
 // RUN: -c -std=gnu89 -xc %s | llvm-nm - 2>&1 | \