]> granicus.if.org Git - clang/commitdiff
Fix logic such that we only call getToolChain once. No functional change
authorChad Rosier <mcrosier@apple.com>
Fri, 27 Apr 2012 16:50:38 +0000 (16:50 +0000)
committerChad Rosier <mcrosier@apple.com>
Fri, 27 Apr 2012 16:50:38 +0000 (16:50 +0000)
intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155719 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Driver.cpp

index 7e8b52974f669915b7e711a7b7bd17611c9660fe..7874a48cde7c7166f42cf362fc7258a48cb62a96 100644 (file)
@@ -1347,11 +1347,13 @@ void Driver::BuildJobsForAction(Compilation &C,
   }
 
   if (const BindArchAction *BAA = dyn_cast<BindArchAction>(A)) {
-    const ToolChain *TC = &C.getDefaultToolChain();
+    const ToolChain *TC;
     const char *ArchName = BAA->getArchName();
 
     if (ArchName)
       TC = &getToolChain(C.getArgs(), ArchName);
+    else
+      TC = &C.getDefaultToolChain();
 
     BuildJobsForAction(C, *BAA->begin(), TC, BAA->getArchName(),
                        AtTopLevel, LinkingOutput, Result);