From 2b42080b51c9a0c5ed733b30da165774dcd0d595 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Tue, 14 Jul 2020 14:39:51 -0700 Subject: [clang] Teach -fembed-bitcode option not to embed W_value Group Summary: -fembed-bitcode options doesn't embed warning options since they are useless to code generation. Make sure it handles the W_value group and not embed those options in the output. Reviewers: zixuw, arphaman Reviewed By: zixuw Subscribers: jkorous, dexonsmith, ributzka, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D83813 --- clang/lib/Frontend/CompilerInvocation.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 863c6b3..75d7cf5 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1086,8 +1086,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, A->getOption().getID() == options::OPT_INPUT || A->getOption().getID() == options::OPT_x || A->getOption().getID() == options::OPT_fembed_bitcode || - (A->getOption().getGroup().isValid() && - A->getOption().getGroup().getID() == options::OPT_W_Group)) + A->getOption().matches(options::OPT_W_Group)) continue; ArgStringList ASL; A->render(Args, ASL); -- cgit v1.1