[HIPIFY] Add a compatibility for CharSourceRange if LLVM < 7
This commit is contained in:
1 parent
6833886449
commit
3dcae8760d
3 files changed
+11
-1
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user