From 87414e697278eec052848aa6950ce556c705f848 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 21 Jul 2019 19:27:21 +0200 Subject: [PATCH] use PragmaIntroducer as HandlePragma argument LLVM commit ddde0ec1e47 replaced the PragmaIntroducerKind argument by an PragmaIntroducer argument. Adjust the argument in the overriding methods accordingly. Signed-off-by: Sven Verdoolaege --- m4/ax_detect_clang.m4 | 4 ++++ pet.cc | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/m4/ax_detect_clang.m4 b/m4/ax_detect_clang.m4 index 5fb57a3..7def89d 100644 --- a/m4/ax_detect_clang.m4 +++ b/m4/ax_detect_clang.m4 @@ -222,6 +222,10 @@ AC_TRY_COMPILE([ AC_CHECK_HEADER([llvm/Option/Arg.h], [AC_DEFINE([HAVE_LLVM_OPTION_ARG_H], [], [Define if llvm/Option/Arg.h exists])]) +AC_EGREP_HEADER([PragmaIntroducer ], + [clang/Lex/Pragma.h], [], + [AC_DEFINE([PragmaIntroducer], [PragmaIntroducerKind], + [Define to PragmaIntroducerKind for older versions of clang])]) AC_LANG_POP CPPFLAGS="$SAVE_CPPFLAGS" diff --git a/pet.cc b/pet.cc index 46e3ed9..058ec07 100644 --- a/pet.cc +++ b/pet.cc @@ -166,7 +166,7 @@ struct PragmaValueBoundsHandler : public PragmaHandler { } virtual void HandlePragma(Preprocessor &PP, - PragmaIntroducerKind Introducer, + PragmaIntroducer Introducer, Token &ScopTok) { isl_id *id; isl_space *dim; @@ -270,7 +270,7 @@ struct PragmaParameterHandler : public PragmaHandler { context_value(context_value) {} virtual void HandlePragma(Preprocessor &PP, - PragmaIntroducerKind Introducer, + PragmaIntroducer Introducer, Token &ScopTok) { isl_id *id; isl_ctx *ctx = isl_set_get_ctx(context); @@ -335,7 +335,7 @@ struct PragmaPencilHandler : public PragmaHandler { PragmaHandler("pencil"), independent(independent) {} virtual void HandlePragma(Preprocessor &PP, - PragmaIntroducerKind Introducer, + PragmaIntroducer Introducer, Token &PencilTok) { Token token; IdentifierInfo *info; @@ -435,7 +435,7 @@ struct PragmaScopHandler : public PragmaHandler { PragmaHandler("scop"), scops(scops) {} virtual void HandlePragma(Preprocessor &PP, - PragmaIntroducerKind Introducer, + PragmaIntroducer Introducer, Token &ScopTok) { SourceManager &SM = PP.getSourceManager(); SourceLocation sloc = ScopTok.getLocation(); @@ -457,7 +457,7 @@ struct PragmaEndScopHandler : public PragmaHandler { PragmaHandler("endscop"), scops(scops) {} virtual void HandlePragma(Preprocessor &PP, - PragmaIntroducerKind Introducer, + PragmaIntroducer Introducer, Token &EndScopTok) { SourceManager &SM = PP.getSourceManager(); SourceLocation sloc = EndScopTok.getLocation(); @@ -479,7 +479,7 @@ struct PragmaLiveOutHandler : public PragmaHandler { PragmaHandler("live"), sema(sema), live_out(live_out) {} virtual void HandlePragma(Preprocessor &PP, - PragmaIntroducerKind Introducer, + PragmaIntroducer Introducer, Token &ScopTok) { Token token; -- 2.11.4.GIT