summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorSylvestre Ledru <sylvestre@debian.org>2014-08-11 18:09:03 +0000
committerSylvestre Ledru <sylvestre@debian.org>2014-08-11 18:09:03 +0000
commitb8198f022231eabc82e445c8237add7571260303 (patch)
tree7bf856f929cea6fb54628302674822f74d360e75 /clang/lib/Driver/Tools.cpp
parentf6102892efaeb41d2b8029d44517c9e0990567ec (diff)
downloadbcm5719-llvm-b8198f022231eabc82e445c8237add7571260303.tar.gz
bcm5719-llvm-b8198f022231eabc82e445c8237add7571260303.zip
GCC compatibility: Ignore -fexec-charset=UTF-8 argument. It is the default in Clang. Reject other values.
Summary: Just like with -finput-charset=UTF-8 in review http://reviews.llvm.org/D4347, I think we should just ignore it when UTF-8 is provided. Reviewers: rnk, rafael Reviewed By: rafael Subscribers: rafael, cfe-commits Differential Revision: http://reviews.llvm.org/D4841 llvm-svn: 215368
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index b6274a8fc78..2a817f78638 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4177,6 +4177,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
D.Diag(diag::err_drv_invalid_value) << inputCharset->getAsString(Args) << value;
}
+ // -fexec_charset=UTF-8 is default. Reject others
+ if (Arg *execCharset = Args.getLastArg(
+ options::OPT_fexec_charset_EQ)) {
+ StringRef value = execCharset->getValue();
+ if (value != "UTF-8")
+ D.Diag(diag::err_drv_invalid_value) << execCharset->getAsString(Args) << value;
+ }
+
// -fcaret-diagnostics is default.
if (!Args.hasFlag(options::OPT_fcaret_diagnostics,
options::OPT_fno_caret_diagnostics, true))
OpenPOWER on IntegriCloud