aboutsummaryrefslogtreecommitdiff
path: root/test/Driver/darwin-ld.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-11 23:07:50 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-11 23:07:50 +0000
commitb18dc5b8376f42f7b4802bf1279e95eeb813fa06 (patch)
treede6fb8de00dc3b7c3ed3b1477cf6f1b8fac792e6 /test/Driver/darwin-ld.c
parentc176bc6be6f1407e7c6bd062f05a8636ea9a08e3 (diff)
Driver/Darwin: Pass -demangle when linking, if the linker supports it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Driver/darwin-ld.c')
-rw-r--r--test/Driver/darwin-ld.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Driver/darwin-ld.c b/test/Driver/darwin-ld.c
index 448446885a..95e5b5febc 100644
--- a/test/Driver/darwin-ld.c
+++ b/test/Driver/darwin-ld.c
@@ -82,3 +82,26 @@
//
// LINK_EXPLICIT_NO_PIE: ld"
// LINK_EXPLICIT_NO_PIE: "-no_pie"
+
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### %t.o \
+// RUN: -mlinker-version=100 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_NEWER_DEMANGLE %s < %t.log
+//
+// LINK_NEWER_DEMANGLE: ld"
+// LINK_NEWER_DEMANGLE: "-demangle"
+
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### %t.o \
+// RUN: -mlinker-version=100 -Wl,--no-demangle 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_NEWER_NODEMANGLE %s < %t.log
+//
+// LINK_NEWER_NODEMANGLE: ld"
+// LINK_NEWER_NODEMANGLE-NOT: "-demangle"
+// LINK_NEWER_NODEMANGLE: "-lgcc"
+
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### %t.o \
+// RUN: -mlinker-version=95 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_OLDER_NODEMANGLE %s < %t.log
+//
+// LINK_OLDER_NODEMANGLE: ld"
+// LINK_OLDER_NODEMANGLE-NOT: "-demangle"
+// LINK_OLDER_NODEMANGLE: "-lgcc"