[HIPIFY] LLVM compatibility

+ sys::fs::make_absolute fro LLVM < 5.0
+ sys::fs::real_path for LLVM >= 5.0


[ROCm/hip commit: 208d7cfaf1]
This commit is contained in:
emankov
2018-12-28 01:34:35 +03:00
bovenliggende b03ce73d51
commit 279550644e
3 gewijzigde bestanden met toevoegingen van 15 en 3 verwijderingen
@@ -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