[HIPIFY] Add a compatibility for CharSourceRange if LLVM < 7

This commit is contained in:
Evgeny Mankov
2019-11-06 14:30:39 +03:00
förälder 32a67c9f14
incheckning c87ab05fc6
3 ändrade filer med 11 tillägg och 1 borttagningar
+8
Visa fil
@@ -151,4 +151,12 @@ bool CheckCompatibility() {
return true;
}
clang::SourceLocation getEndOfExpansionRangeForLoc(const clang::SourceManager& SM, const clang::SourceLocation& loc) {
#if LLVM_VERSION_MAJOR > 6
return SM.getExpansionRange(loc).getEnd();
#else
return SM.getExpansionRange(loc).second;
#endif
}
} // namespace llcompat