[HIPIFY] Current trunk LLVM 7.0 initial support

Tested with CUDA 8.0, 9.0, 9.1 and 9.2.

Only 8.0 works with LLVM 7.0, due to the changes in LLVM trunc since released 6.0, which works fine with CUDA 8.0 and 9.0.

So, nothing to do in hipify-clang, hope that all the CUDA 9.x related issues will be fixed in 7.0 release.
This commit is contained in:
Evgeny Mankov
2018-07-11 20:15:49 +03:00
parent cfbabfa95a
commit b9c15702d2
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -51,6 +51,10 @@ if(WIN32)
target_link_libraries(hipify-clang version)
endif()
if ((LLVM_PACKAGE_VERSION VERSION_EQUAL "7") OR (LLVM_PACKAGE_VERSION VERSION_GREATER "7"))
target_link_libraries(hipify-clang clangToolingInclusions)
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS}")
if(MSVC)
@@ -95,7 +99,7 @@ if (HIPIFY_CLANG_TESTS)
message(STATUS "Please install clang 4.0 or higher.")
elseif (CUDA_VERSION VERSION_EQUAL "9.0")
message(STATUS "Please install clang 6.0 or higher.")
elseif (CUDA_VERSION VERSION_EQUAL "9.1")
elseif ((CUDA_VERSION VERSION_EQUAL "9.1") OR (CUDA_VERSION VERSION_EQUAL "9.2"))
message(STATUS "Please install clang 7.0 or higher.")
endif()
endif()
+5 -1
View File
@@ -428,7 +428,11 @@ public:
void InclusionDirective(clang::SourceLocation hash_loc, const clang::Token& include_token,
StringRef file_name, bool is_angled, clang::CharSourceRange filename_range,
const clang::FileEntry* file, StringRef search_path, StringRef relative_path,
const clang::Module* imported) override {
const clang::Module* imported
#if LLVM_VERSION_MAJOR > 6
, clang::SrcMgr::CharacteristicKind FileType
#endif
) override {
hipifyAction.InclusionDirective(hash_loc, include_token, file_name, is_angled, filename_range, file, search_path, relative_path, imported);
}