[cfe-commits] r108711 - in /cfe/trunk/lib/Driver: ToolChains.cpp ToolChains.h
Daniel Dunbar
daniel at zuster.org
Mon Jul 19 10:11:33 PDT 2010
Author: ddunbar
Date: Mon Jul 19 12:11:33 2010
New Revision: 108711
URL: http://llvm.org/viewvc/llvm-project?rev=108711&view=rev
Log:
Driver: Factor out Darwin::AddDeploymentTarget.
Modified:
cfe/trunk/lib/Driver/ToolChains.cpp
cfe/trunk/lib/Driver/ToolChains.h
Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=108711&r1=108710&r2=108711&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Mon Jul 19 12:11:33 2010
@@ -415,18 +415,10 @@
}
}
-DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
- const char *BoundArch) const {
- DerivedArgList *DAL = new DerivedArgList(Args.getBaseArgs());
+void Darwin::AddDeploymentTarget(const DerivedArgList &Args,
+ DerivedArgList *DAL) const {
const OptTable &Opts = getDriver().getOpts();
- // FIXME: We really want to get out of the tool chain level argument
- // translation business, as it makes the driver functionality much
- // more opaque. For now, we follow gcc closely solely for the
- // purpose of easily achieving feature parity & testability. Once we
- // have something that works, we should reevaluate each translation
- // and try to push it down into tool specific logic.
-
Arg *OSXVersion = Args.getLastArg(options::OPT_mmacosx_version_min_EQ);
Arg *iPhoneVersion = Args.getLastArg(options::OPT_miphoneos_version_min_EQ);
if (OSXVersion && iPhoneVersion) {
@@ -495,6 +487,20 @@
<< iPhoneVersion->getAsString(Args);
}
setTarget(iPhoneVersion, Major, Minor, Micro);
+}
+
+DerivedArgList *Darwin::TranslateArgs(const DerivedArgList &Args,
+ const char *BoundArch) const {
+ DerivedArgList *DAL = new DerivedArgList(Args.getBaseArgs());
+ const OptTable &Opts = getDriver().getOpts();
+
+ // FIXME: We really want to get out of the tool chain level argument
+ // translation business, as it makes the driver functionality much
+ // more opaque. For now, we follow gcc closely solely for the
+ // purpose of easily achieving feature parity & testability. Once we
+ // have something that works, we should reevaluate each translation
+ // and try to push it down into tool specific logic.
+ AddDeploymentTarget(Args, DAL);
for (ArgList::const_iterator it = Args.begin(),
ie = Args.end(); it != ie; ++it) {
Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=108711&r1=108710&r2=108711&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Mon Jul 19 12:11:33 2010
@@ -61,6 +61,10 @@
/// initialized.
std::string MacosxVersionMin;
+private:
+ void AddDeploymentTarget(const DerivedArgList &Args,
+ DerivedArgList *DAL) const;
+
public:
Darwin(const HostInfo &Host, const llvm::Triple& Triple,
const unsigned (&DarwinVersion)[3]);
More information about the cfe-commits
mailing list