[HIPIFY] LLVM compatibility
+ sys::fs::make_absolute fro LLVM < 5.0 + sys::fs::real_path for LLVM >= 5.0
This commit is contained in:
@@ -94,4 +94,13 @@ clang::SourceLocation getEndLoc(const clang::TypeLoc& typeLoc) {
|
||||
#endif
|
||||
}
|
||||
|
||||
std::error_code real_path(const Twine &path, SmallVectorImpl<char> &output,
|
||||
bool expand_tilde) {
|
||||
#if LLVM_VERSION_MAJOR < 5
|
||||
return sys::fs::make_absolute(path, output);
|
||||
#else
|
||||
return sys::fs::real_path(path, output, expand_tilde);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace llcompat
|
||||
|
||||
Reference in New Issue
Block a user