From 733198de1b7fc3907609217147704f493f6146e6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 29 Jun 2016 09:15:05 +0200 Subject: Remove support for Clang < 3.4 Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0 --- compilerplugins/clang/compat.hxx | 50 ---------------------------------------- 1 file changed, 50 deletions(-) (limited to 'compilerplugins/clang/compat.hxx') 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(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) -- cgit