[cfe-commits] r81366 - in /cfe/trunk: include/clang/Driver/ToolChain.h lib/Driver/Compilation.cpp lib/Driver/ToolChains.cpp lib/Driver/ToolChains.h
Daniel Dunbar
daniel at zuster.org
Wed Sep 9 11:36:13 PDT 2009
Author: ddunbar
Date: Wed Sep 9 13:36:12 2009
New Revision: 81366
URL: http://llvm.org/viewvc/llvm-project?rev=81366&view=rev
Log:
Push bound architecture name into TranslateArgs.
Modified:
cfe/trunk/include/clang/Driver/ToolChain.h
cfe/trunk/lib/Driver/Compilation.cpp
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/ToolChains.h
Modified: cfe/trunk/include/clang/Driver/ToolChain.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ToolChain.h?rev=81366&r1=81365&r2=81366&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/ToolChain.h (original)
+++ cfe/trunk/include/clang/Driver/ToolChain.h Wed Sep 9 13:36:12 2009
@@ -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;
Modified: cfe/trunk/lib/Driver/Compilation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Compilation.cpp?rev=81366&r1=81365&r2=81366&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Compilation.cpp (original)
+++ cfe/trunk/lib/Driver/Compilation.cpp Wed Sep 9 13:36:12 2009
@@ -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;
}
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=81366&r1=81365&r2=81366&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Sep 9 13:36:12 2009
@@ -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);
}
Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=81366&r1=81365&r2=81366&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Wed Sep 9 13:36:12 2009
@@ -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;
More information about the cfe-commits
mailing list