Skip to content

Commit 29e72b9

Browse files
committed
simplify option conditions
1 parent f11b730 commit 29e72b9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -503,11 +503,9 @@ cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const {
503503
using CIRLang = cir::SourceLanguage;
504504
auto opts = getLangOpts();
505505

506-
if (opts.CPlusPlus || opts.CPlusPlus11 || opts.CPlusPlus14 ||
507-
opts.CPlusPlus17 || opts.CPlusPlus20 || opts.CPlusPlus23 ||
508-
opts.CPlusPlus26)
506+
if (opts.CPlusPlus)
509507
return CIRLang::CXX;
510-
if (opts.C99 || opts.C11 || opts.C17 || opts.C23 ||
508+
if (opts.C99 || opts.C11 || opts.C17 || opts.C23 || opts.C2y ||
511509
opts.LangStd == ClangStd::lang_c89 ||
512510
opts.LangStd == ClangStd::lang_gnu89)
513511
return CIRLang::C;

0 commit comments

Comments
 (0)