[HIPIFY] Add a compatibility for CharSourceRange if LLVM < 7
This commit is contained in:
@@ -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
|
||||
|
||||
Referens i nytt ärende
Block a user