blob: d89d5bad1aaf4d1dd1c86bee50768ad6b11cbdf1 [file] [log] [blame]
Daniel Dunbarf78925f2010-06-14 21:23:12 +00001// Check that we extract --no-demangle from '-Xlinker' and '-Wl,', since that
2// was a collect2 argument.
3
Sebastian Pop9ec60df2012-01-20 22:01:23 +00004// RUN: %clang -target i386-apple-darwin9 -### \
Daniel Dunbarf78925f2010-06-14 21:23:12 +00005// RUN: -Xlinker one -Xlinker --no-demangle \
6// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
Nick Lewyckye276cfc2012-08-17 03:39:16 +00007// RUN: FileCheck -check-prefix=DARWIN < %t %s
Daniel Dunbarf78925f2010-06-14 21:23:12 +00008//
Nick Lewyckye276cfc2012-08-17 03:39:16 +00009// RUN: %clang -target x86_64-pc-linux-gnu -### \
10// RUN: -Xlinker one -Xlinker --no-demangle \
11// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
12// RUN: FileCheck -check-prefix=LINUX < %t %s
13//
14// DARWIN-NOT: --no-demangle
15// DARWIN: "one" "two" "three" "four"
16// LINUX: "--no-demangle" "one" "two" "three" "four"