summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2013-09-18 22:26:39 +0000
committerHans Wennborg <hans@hanshq.net>2013-09-18 22:26:39 +0000
commit9cb7d9ba94769d77b077b813536d35f27a9918f1 (patch)
tree5926745e39981c2985515bf9361b43798a7c2b3a /clang/lib/Driver/Driver.cpp
parent0db88a7d7e96cc75c53ea04878b003453cfc9023 (diff)
downloadbcm5719-llvm-9cb7d9ba94769d77b077b813536d35f27a9918f1.tar.gz
bcm5719-llvm-9cb7d9ba94769d77b077b813536d35f27a9918f1.zip
clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.
I put in the warnings because MSVC has them, but I don't think they're very useful. Clang does not warn about overriding flags in general, e.g. it's perfectly fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer. We should focus on warning where things get confusing, such as with the /TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not realize that the /TP flag will apply to both files, and we warn about that. Differential Revision: http://llvm-reviews.chandlerc.com/D1718 llvm-svn: 190964
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp22
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 7ad09accd8c..a2cf06a20cd 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -284,26 +284,6 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const {
return DAL;
}
-/// \brief Check whether there are multiple instances of OptionID in Args, and
-/// if so, issue a diagnostics about it.
-static void DiagnoseOptionOverride(const Driver &D, const DerivedArgList &Args,
- unsigned OptionID) {
- assert(Args.hasArg(OptionID));
-
- arg_iterator it = Args.filtered_begin(OptionID);
- arg_iterator ie = Args.filtered_end();
- Arg *Previous = *it;
- ++it;
-
- while (it != ie) {
- D.Diag(clang::diag::warn_drv_overriding_joined_option)
- << Previous->getSpelling() << Previous->getValue()
- << (*it)->getSpelling() << (*it)->getValue();
- Previous = *it;
- ++it;
- }
-}
-
Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
llvm::PrettyStackTraceString CrashInfo("Compilation construction");
@@ -1158,7 +1138,6 @@ void Driver::BuildActions(const ToolChain &TC, DerivedArgList &Args,
// Diagnose misuse of /Fo.
if (Arg *A = Args.getLastArg(options::OPT__SLASH_Fo)) {
- DiagnoseOptionOverride(*this, Args, options::OPT__SLASH_Fo);
StringRef V = A->getValue();
if (V.empty()) {
// It has to have a value.
@@ -1174,7 +1153,6 @@ void Driver::BuildActions(const ToolChain &TC, DerivedArgList &Args,
// Diagnose misuse of /Fe.
if (Arg *A = Args.getLastArg(options::OPT__SLASH_Fe)) {
- DiagnoseOptionOverride(*this, Args, options::OPT__SLASH_Fe);
if (A->getValue()[0] == '\0') {
// It has to have a value.
Diag(clang::diag::err_drv_missing_argument) << A->getSpelling() << 1;
OpenPOWER on IntegriCloud