// RUN: mkdir -p %t/UNIQUEISH_SENTINEL
// RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c

// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN:   %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \
// RUN:   | FileCheck %s

// RUN: cp %s %t.c
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN:   %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE
void foo() {}

// Since %s is an absolute path, directory should be the common
// prefix, but the directory part should be part of the filename.

// CHECK: DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL{{.*}}debug-info-abspath.c"
// CHECK-NOT:    directory: "{{.*}}UNIQUEISH_SENTINEL

// INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")

// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN:   %s -emit-llvm -o - | FileCheck %s

// RUN: cp %s %t.c
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
// RUN:   %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE
void foo() {}

// Since %s is an absolute path, directory should be a nonempty
// prefix, but the CodeGen part should be part of the filename.

// CHECK: DIFile(filename: "{{.*}}CodeGen{{.*}}debug-info-abspath.c"
// CHECK-SAME:   directory: "{{.+}}")

// INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")

--- 
+++ 
@@ -1,15 +1,19 @@
+// RUN: mkdir -p %t/UNIQUEISH_SENTINEL
+// RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c
+
 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
-// RUN:   %s -emit-llvm -o - | FileCheck %s
+// RUN:   %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \
+// RUN:   | FileCheck %s
 
 // RUN: cp %s %t.c
 // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \
 // RUN:   %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE
 void foo() {}
 
-// Since %s is an absolute path, directory should be a nonempty
-// prefix, but the CodeGen part should be part of the filename.
+// Since %s is an absolute path, directory should be the common
+// prefix, but the directory part should be part of the filename.
 
-// CHECK: DIFile(filename: "{{.*}}CodeGen{{.*}}debug-info-abspath.c"
-// CHECK-SAME:   directory: "{{.+}}")
+// CHECK: DIFile(filename: "{{.*}}UNIQUEISH_SENTINEL{{.*}}debug-info-abspath.c"
+// CHECK-NOT:    directory: "{{.*}}UNIQUEISH_SENTINEL
 
 // INTREE: DIFile({{.*}}directory: "{{.+}}CodeGen{{.*}}")
Make testcase more robust for completely-out-of-tree builds.

Thats to Dave Zarzycki for reprorting this!

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@348612 91177308-0d34-0410-b5e6-96231b3b80d8
