diff options
author | Harald van Dijk <harald@gigawatt.nl> | 2022-05-02 18:07:47 +0100 |
---|---|---|
committer | Harald van Dijk <harald@gigawatt.nl> | 2022-05-02 18:07:47 +0100 |
commit | fed7be096f8ed5d70029acd712ac19ffc61e04e5 (patch) | |
tree | d049b9923e108bc58ff9c10c06d0bfbb9a865dfc /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 2534dc120a4c9468d9a0044665a50361089f0a4d (diff) | |
download | llvm-fed7be096f8ed5d70029acd712ac19ffc61e04e5.zip llvm-fed7be096f8ed5d70029acd712ac19ffc61e04e5.tar.gz llvm-fed7be096f8ed5d70029acd712ac19ffc61e04e5.tar.bz2 |
Mark identifier prefixes as substitutable
The Itanium C++ ABI says prefixes are substitutable. For most prefixes
we already handle this: the manglePrefix(const DeclContext *, bool) and
manglePrefix(QualType) overloads explicitly handles substitutions or
defer to functions that handle substitutions on their behalf. The
manglePrefix(NestedNameSpecifier *) overload, however, is different and
handles some cases implicitly, but not all. The Identifier case was not
handled; this change adds handling for it, as well as a test case.
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D122663
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index b35e3f4..847766a 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -3518,6 +3518,8 @@ void CompilerInvocation::GenerateLangArgs(const LangOptions &Opts, GenerateArg(Args, OPT_fclang_abi_compat_EQ, "12.0", SA); else if (Opts.getClangABICompat() == LangOptions::ClangABI::Ver13) GenerateArg(Args, OPT_fclang_abi_compat_EQ, "13.0", SA); + else if (Opts.getClangABICompat() == LangOptions::ClangABI::Ver14) + GenerateArg(Args, OPT_fclang_abi_compat_EQ, "14.0", SA); if (Opts.getSignReturnAddressScope() == LangOptions::SignReturnAddressScopeKind::All) @@ -4026,6 +4028,8 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Opts.setClangABICompat(LangOptions::ClangABI::Ver12); else if (Major <= 13) Opts.setClangABICompat(LangOptions::ClangABI::Ver13); + else if (Major <= 14) + Opts.setClangABICompat(LangOptions::ClangABI::Ver14); } else if (Ver != "latest") { Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << A->getValue(); |