summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-04-29 18:45:01 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2014-04-29 18:45:01 +0000
commitebbe39ffbe9af1fb0d541990352218320cf28466 (patch)
tree10caca4abe3795753aae453f17dc0a0052bb89e7 /test
parent32f64aa4499715298b3c9658258865c806e8abe1 (diff)
downloadclang-ebbe39ffbe9af1fb0d541990352218320cf28466.tar.gz
[PCH/Modules] Don't tie TargetOptions::LinkerVersion to a module/PCH, it's a driver only thing and doesn't affect any language/preprocessor/etc. semantics.
rdar://16714526 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Modules/module_file_info.m1
-rw-r--r--test/PCH/different-linker-version.c17
2 files changed, 17 insertions, 1 deletions
diff --git a/test/Modules/module_file_info.m b/test/Modules/module_file_info.m
index 13e086ee48..3c10780f25 100644
--- a/test/Modules/module_file_info.m
+++ b/test/Modules/module_file_info.m
@@ -19,7 +19,6 @@
// CHECK: Triple:
// CHECK: CPU:
// CHECK: ABI:
-// CHECK: Linker version:
// CHECK: Diagnostic options:
// CHECK: IgnoreWarnings: Yes
diff --git a/test/PCH/different-linker-version.c b/test/PCH/different-linker-version.c
new file mode 100644
index 0000000000..9e2f38f674
--- /dev/null
+++ b/test/PCH/different-linker-version.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -target-linker-version 100 -emit-pch %s -o %t.h.pch
+// RUN: %clang_cc1 -target-linker-version 200 %s -include-pch %t.h.pch -fsyntax-only -verify
+
+#ifndef HEADER
+#define HEADER
+
+extern int foo;
+
+#else
+
+void f() {
+ int a = foo;
+ // Make sure we parsed this by getting an error.
+ int b = bar; // expected-error {{undeclared}}
+}
+
+#endif