Push bound architecture name into TranslateArgs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81366 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
index c9d0ef1..ab91965 100644
--- a/include/clang/Driver/ToolChain.h
+++ b/include/clang/Driver/ToolChain.h
@@ -68,9 +68,12 @@
// Tool access.
- /// TranslateArgs - Create a new derived argument list for any
- /// argument translations this ToolChain may wish to perform.
- virtual DerivedArgList *TranslateArgs(InputArgList &Args) const = 0;
+ /// TranslateArgs - Create a new derived argument list for any argument
+ /// translations this ToolChain may wish to perform.
+ ///
+ /// \param BoundArch - The bound architecture name, or 0.
+ virtual DerivedArgList *TranslateArgs(InputArgList &Args,
+ const char *BoundArch) const = 0;
/// SelectTool - Choose a tool to use to handle the action \arg JA.
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const = 0;
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp
index f6e1885..c12f5aa 100644
--- a/lib/Driver/Compilation.cpp
+++ b/lib/Driver/Compilation.cpp
@@ -49,7 +49,7 @@
DerivedArgList *&Entry = TCArgs[std::make_pair(TC, BoundArch)];
if (!Entry)
- Entry = TC->TranslateArgs(*Args);
+ Entry = TC->TranslateArgs(*Args, BoundArch);
return *Entry;
}
diff --git a/lib/Driver/ToolChains.cpp b/lib/Driver/ToolChains.cpp
index fb6217d..7b14a20 100644
--- a/lib/Driver/ToolChains.cpp
+++ b/lib/Driver/ToolChains.cpp
@@ -133,7 +133,8 @@
return *T;
}
-DerivedArgList *Darwin::TranslateArgs(InputArgList &Args) const {
+DerivedArgList *Darwin::TranslateArgs(InputArgList &Args,
+ const char *BoundArch) const {
DerivedArgList *DAL = new DerivedArgList(Args, false);
const OptTable &Opts = getHost().getDriver().getOpts();
@@ -389,7 +390,8 @@
return 0;
}
-DerivedArgList *Generic_GCC::TranslateArgs(InputArgList &Args) const {
+DerivedArgList *Generic_GCC::TranslateArgs(InputArgList &Args,
+ const char *BoundArch) const {
return new DerivedArgList(Args, true);
}
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 6a3ce37..0e5ce34 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -33,7 +33,8 @@
Generic_GCC(const HostInfo &Host, const llvm::Triple& Triple);
~Generic_GCC();
- virtual DerivedArgList *TranslateArgs(InputArgList &Args) const;
+ virtual DerivedArgList *TranslateArgs(InputArgList &Args,
+ const char *BoundArch) const;
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
@@ -101,7 +102,8 @@
bool isIPhone() const { return IsIPhone; }
- virtual DerivedArgList *TranslateArgs(InputArgList &Args) const;
+ virtual DerivedArgList *TranslateArgs(InputArgList &Args,
+ const char *BoundArch) const;
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;