diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-11-03 22:42:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-11-04 09:51:18 +0100 |
commit | 5323c18753504ae99e271f98052b13271343de6f (patch) | |
tree | 34de1a56e3bf42dd0c31026f09a73adb277a3566 /compilerplugins/clang/compat.hxx | |
parent | bfbf0b0991c69a66b5a511acdd2f56aaf834ec91 (diff) |
Adapt to Clang 18 trunk Linkage rework
<https://github.com/llvm/llvm-project/commit/8775947633bf189e1847707932b1015f04640ea0>
"[clang][NFC] Refactor clang::Linkage"
Change-Id: I35e3a3c7e3de29e4f3b9ee8dfc34e39ba2aa1c70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index 21a3c4ae4018..df4052ef108a 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -91,6 +91,17 @@ constexpr clang::ElaboratedTypeKeyword None = clang::ETK_None; #endif } +namespace Linkage +{ +#if CLANG_VERSION >= 180000 +constexpr clang::Linkage External = clang::Linkage::External; +constexpr clang::Linkage Module = clang::Linkage::Module; +#else +constexpr clang::Linkage External = clang::ExternalLinkage; +constexpr clang::Linkage Module = clang::ModuleLinkage; +#endif +} + inline bool EvaluateAsInt(clang::Expr const * expr, llvm::APSInt& intRes, const clang::ASTContext& ctx) { clang::Expr::EvalResult res; bool b = expr->EvaluateAsInt(res, ctx); |