[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:
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Verwijs in nieuw issue
Block a user