Include the SourceManager's line table in the PCH file. We can now
properly cope with #line directives in PCH files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68963 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/PCH/line-directive.c b/test/PCH/line-directive.c
new file mode 100644
index 0000000..87aa4b0
--- /dev/null
+++ b/test/PCH/line-directive.c
@@ -0,0 +1,25 @@
+// Test this without pch.
+// RUN: clang-cc -triple=i686-apple-darwin9 -include %S/line-directive.h -fsyntax-only %s 2>&1|grep "25:5"
+
+// Test with pch.
+// RUN: clang-cc -emit-pch -triple=i686-apple-darwin9 -o %t %S/line-directive.h &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -include-pch %t -fsyntax-only %s 2>&1|grep "25:5"  
+
+double x; // expected-error{{redefinition of 'x' with a different type}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+// expected-note{{previous definition is here}}
diff --git a/test/PCH/line-directive.h b/test/PCH/line-directive.h
new file mode 100644
index 0000000..c5594b4
--- /dev/null
+++ b/test/PCH/line-directive.h
@@ -0,0 +1,2 @@
+#line 25 "line-directive.c"
+int x;
diff --git a/test/PCH/variables.c b/test/PCH/variables.c
index f725e7d..ec16576 100644
--- a/test/PCH/variables.c
+++ b/test/PCH/variables.c
@@ -1,5 +1,5 @@
 // Test this without pch.
-// RUN: clang-cc -triple=i686-apple-darwin9 -include %S/variables.h -fsyntax-only -verify %s &&
+// RUN: clang-cc -triple=i686-apple-darwin9 -include %S/variables.h -fsyntax-only -verify %s
 
 // Test with pch.
 // RUN: clang-cc -emit-pch -triple=i686-apple-darwin9 -o %t %S/variables.h &&