Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
- Most driver code always claims, and bool arguments don't play nice with the overloads.
llvm-svn: 89308
diff --git a/clang/lib/Driver/ToolChains.cpp b/clang/lib/Driver/ToolChains.cpp
index 296e399..8242d31 100644
--- a/clang/lib/Driver/ToolChains.cpp
+++ b/clang/lib/Driver/ToolChains.cpp
@@ -304,9 +304,9 @@
// and try to push it down into tool specific logic.
Arg *OSXVersion =
- Args.getLastArg(options::OPT_mmacosx_version_min_EQ, false);
+ Args.getLastArgNoClaim(options::OPT_mmacosx_version_min_EQ);
Arg *iPhoneVersion =
- Args.getLastArg(options::OPT_miphoneos_version_min_EQ, false);
+ Args.getLastArgNoClaim(options::OPT_miphoneos_version_min_EQ);
if (OSXVersion && iPhoneVersion) {
getHost().getDriver().Diag(clang::diag::err_drv_argument_not_allowed_with)
<< OSXVersion->getAsString(Args)
@@ -440,7 +440,7 @@
if (getTriple().getArch() == llvm::Triple::x86 ||
getTriple().getArch() == llvm::Triple::x86_64)
- if (!Args.hasArg(options::OPT_mtune_EQ, false))
+ if (!Args.hasArgNoClaim(options::OPT_mtune_EQ))
DAL->append(DAL->MakeJoinedArg(0, Opts.getOption(options::OPT_mtune_EQ),
"core2"));