diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-06-29 09:15:05 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-06-29 09:15:25 +0200 |
commit | 733198de1b7fc3907609217147704f493f6146e6 (patch) | |
tree | 1ab5ee016775b53b00a3ccdc43f7bd3a767982b6 /compilerplugins/clang/compat.hxx | |
parent | 94809ea0d4101679794bb239313c4d73fab30419 (diff) |
Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
Diffstat (limited to 'compilerplugins/clang/compat.hxx')
-rw-r--r-- | compilerplugins/clang/compat.hxx | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx index b78f90a23dfd..063d0ce946fd 100644 --- a/compilerplugins/clang/compat.hxx +++ b/compilerplugins/clang/compat.hxx @@ -32,14 +32,6 @@ #include "config_clang.h" -#if CLANG_VERSION >= 30400 -#define LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion \ - true -#else -#define LO_COMPILERPLUGINS_CLANG_COMPAT_HAVE_isAtEndOfImmediateMacroExpansion \ - false -#endif - // Compatibility wrapper to abstract over (trivial) changes in the Clang API: namespace compat { @@ -52,30 +44,6 @@ inline bool isLookupContext(clang::DeclContext const & ctxt) { #endif } -inline bool isExternCContext(clang::DeclContext const & ctxt) { -#if CLANG_VERSION >= 30400 - return ctxt.isExternCContext(); -#else - for (clang::DeclContext const * c = &ctxt; - c->getDeclKind() != clang::Decl::TranslationUnit; c = c->getParent()) - { - if (c->getDeclKind() == clang::Decl::LinkageSpec) { - return llvm::cast<clang::LinkageSpecDecl>(c)->getLanguage() - == clang::LinkageSpecDecl::lang_c; - } - } - return false; -#endif -} - -inline bool isInExternCContext(clang::FunctionDecl const & decl) { -#if CLANG_VERSION >= 30400 - return decl.isInExternCContext(); -#else - return isExternCContext(*decl.getCanonicalDecl()->getDeclContext()); -#endif -} - inline bool forallBases( clang::CXXRecordDecl const & decl, clang::CXXRecordDecl::ForallBasesCallback BaseMatches, @@ -90,14 +58,6 @@ inline bool forallBases( #endif } -inline bool isFirstDecl(clang::FunctionDecl const & decl) { -#if CLANG_VERSION >= 30400 - return decl.isFirstDecl(); -#else - return decl.isFirstDeclaration(); -#endif -} - inline clang::QualType getReturnType(clang::FunctionDecl const & decl) { #if CLANG_VERSION >= 30500 return decl.getReturnType(); @@ -189,16 +149,6 @@ inline unsigned getBuiltinCallee(clang::CallExpr const & expr) { #endif } -inline bool isInMainFile( - clang::SourceManager const & manager, clang::SourceLocation Loc) -{ -#if CLANG_VERSION >= 30400 - return manager.isInMainFile(Loc); -#else - return manager.isFromMainFile(Loc); -#endif -} - inline unsigned getCustomDiagID( clang::DiagnosticsEngine & engine, clang::DiagnosticsEngine::Level L, llvm::StringRef FormatString) |