[clang] e2d60c8 - [Frontend] Remove unneeded -frtti check. NFC
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 27 21:41:10 PST 2023
Author: Fangrui Song
Date: 2023-11-27T21:41:04-08:00
New Revision: e2d60c86268479b019d62bba25745407dc15ce98
URL: https://github.com/llvm/llvm-project/commit/e2d60c86268479b019d62bba25745407dc15ce98
DIFF: https://github.com/llvm/llvm-project/commit/e2d60c86268479b019d62bba25745407dc15ce98.diff
LOG: [Frontend] Remove unneeded -frtti check. NFC
-frtti is not a CC1 option. We just need to check -fno-rtti.
Added:
Modified:
clang/lib/Frontend/CompilerInvocation.cpp
Removed:
################################################################################
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 3b92cc1281f9e0e..5a8e4cf9843de2b 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -4178,7 +4178,7 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
TargetCXXABI::usesRelativeVTables(T));
// RTTI is on by default.
- bool HasRTTI = Args.hasFlag(options::OPT_frtti, options::OPT_fno_rtti, true);
+ bool HasRTTI = !Args.hasArg(options::OPT_fno_rtti);
Opts.OmitVTableRTTI =
Args.hasFlag(options::OPT_fexperimental_omit_vtable_rtti,
options::OPT_fno_experimental_omit_vtable_rtti, false);
More information about the cfe-commits
mailing list