summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-02-21 00:20:07 +0000
committerBob Wilson <bob.wilson@apple.com>2014-02-21 00:20:07 +0000
commitf8cf1611e33009029956ff76318f1176825e5bf5 (patch)
tree12bc83d4bb8b5e398560d7a5e658862a6c9736da /clang/lib
parent45d71a271554ff183629e7451ada8f440a20654c (diff)
downloadbcm5719-llvm-f8cf1611e33009029956ff76318f1176825e5bf5.tar.gz
bcm5719-llvm-f8cf1611e33009029956ff76318f1176825e5bf5.zip
Fix an assertion failure when invoking dsymutil.
There is no bound architecture for the dsymutil action in the driver. Trying to check various properties of the target will cause an assertion failure because the target doesn't get initialized without a bound architecture. <rdar://problem/16111555> llvm-svn: 201830
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/ToolChains.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index c071a9833cf..4d29a51f4f8 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -893,11 +893,14 @@ DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
DerivedArgList *DAL = MachO::TranslateArgs(Args, BoundArch);
const OptTable &Opts = getDriver().getOpts();
+ // If no architecture is bound, none of the translations here are relevant.
+ if (!BoundArch)
+ return DAL;
+
// Add an explicit version min argument for the deployment target. We do this
// after argument translation because -Xarch_ arguments may add a version min
// argument.
- if (BoundArch)
- AddDeploymentTarget(*DAL);
+ AddDeploymentTarget(*DAL);
// For iOS 6, undo the translation to add -static for -mkernel/-fapple-kext.
// FIXME: It would be far better to avoid inserting those -static arguments,
OpenPOWER on IntegriCloud