aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorcor3ntin <corentinjabot@gmail.com>2024-04-19 17:44:12 +0200
committerGitHub <noreply@github.com>2024-04-19 17:44:12 +0200
commit64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf (patch)
tree5a40ffde6ab1f96b4c2286dfbcbfaa6acfc597d7 /clang/lib/Frontend/CompilerInvocation.cpp
parent5e5b8c49096afba8e4e0fd094a5ab905a9acced0 (diff)
downloadllvm-64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf.zip
llvm-64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf.tar.gz
llvm-64cc3fad53c8313ad2fb3f2ba2fd44f280e5babf.tar.bz2
[Clang] Fix the mangling of lambdas (#89204)
Lambdas used in the initializer of a local class were not mangling the name of the member. Fixes #88906
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 5531e93..8236051 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3660,6 +3660,9 @@ void CompilerInvocationBase::GenerateLangArgs(const LangOptions &Opts,
case LangOptions::ClangABI::Ver17:
GenerateArg(Consumer, OPT_fclang_abi_compat_EQ, "17.0");
break;
+ case LangOptions::ClangABI::Ver18:
+ GenerateArg(Consumer, OPT_fclang_abi_compat_EQ, "18.0");
+ break;
case LangOptions::ClangABI::Latest:
break;
}
@@ -4167,6 +4170,8 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args,
Opts.setClangABICompat(LangOptions::ClangABI::Ver15);
else if (Major <= 17)
Opts.setClangABICompat(LangOptions::ClangABI::Ver17);
+ else if (Major <= 18)
+ Opts.setClangABICompat(LangOptions::ClangABI::Ver18);
} else if (Ver != "latest") {
Diags.Report(diag::err_drv_invalid_value)
<< A->getAsString(Args) << A->getValue();