|
39 | 39 | #include "llvm/Support/Debug.h"
|
40 | 40 | #include "llvm/Support/raw_ostream.h"
|
41 | 41 |
|
42 |
| -#ifndef PYCLIF_LLVM_VERSION_MAJOR |
43 |
| -#define PYCLIF_LLVM_VERSION_MAJOR LLVM_VERSION_MAJOR |
44 |
| -#endif |
45 |
| - |
46 | 42 | #if PYCLIF_LLVM_VERSION_MAJOR > 16
|
47 | 43 | #include "clang/Sema/EnterExpressionEvaluationContext.h"
|
48 | 44 | #endif
|
@@ -2989,20 +2985,20 @@ const clang::FunctionDecl* ClifMatcher::SpecializeFunctionTemplate(
|
2989 | 2985 | }
|
2990 | 2986 |
|
2991 | 2987 | std::string ClifMatcher::TemplateDeductionResult(
|
2992 |
| - clang::TemplateDeductionResult specialized_result) const { |
| 2988 | + PYCLIF_CLANG_TEMPLATEDEDUCTIONRESULT_TYPE specialized_result) const { |
2993 | 2989 | switch (specialized_result) {
|
2994 |
| - case clang::TemplateDeductionResult::Invalid: |
| 2990 | + case PYCLIF_CLANG_TEMPLATEDEDUCTIONRESULT_ENUM(Invalid): |
2995 | 2991 | return "The template function declaration was invalid.";
|
2996 |
| - case clang::TemplateDeductionResult::InstantiationDepth: |
| 2992 | + case PYCLIF_CLANG_TEMPLATEDEDUCTIONRESULT_ENUM(InstantiationDepth): |
2997 | 2993 | return "Template argument deduction exceeded the maximum template "
|
2998 | 2994 | "instantiation depth.";
|
2999 |
| - case clang::TemplateDeductionResult::Incomplete: |
| 2995 | + case PYCLIF_CLANG_TEMPLATEDEDUCTIONRESULT_ENUM(Incomplete): |
3000 | 2996 | return "Template argument deduction did not deduce a value for every "
|
3001 | 2997 | "template parameter.";
|
3002 |
| - case clang::TemplateDeductionResult::Inconsistent: |
| 2998 | + case PYCLIF_CLANG_TEMPLATEDEDUCTIONRESULT_ENUM(Inconsistent): |
3003 | 2999 | return "Template argument deduction produced inconsistent deduced "
|
3004 | 3000 | "values.";
|
3005 |
| - case clang::TemplateDeductionResult::Underqualified: |
| 3001 | + case PYCLIF_CLANG_TEMPLATEDEDUCTIONRESULT_ENUM(Underqualified): |
3006 | 3002 | return "Template argument deduction failed due to inconsistent "
|
3007 | 3003 | "cv-qualifiers.";
|
3008 | 3004 | default:
|
|
0 commit comments