Skip to content

Commit

Permalink
Merge pull request #127 from emankov/master
Browse files Browse the repository at this point in the history
[HIPIFY][#92][#126] Fix clang internal includes
  • Loading branch information
emankov authored Jun 4, 2020
2 parents 885701f + 81b4dbd commit 2341994
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,14 @@ void appendArgumentsAdjusters(ct::RefactoringTool &Tool, const std::string &sSou
std::string clang_inc_path = std::string(llvm::sys::path::parent_path(hipify));
clang_inc_path.append("/include");
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(clang_inc_path.c_str(), ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-isystem", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-Xclang", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-internal-isystem", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-Xclang", ct::ArgumentInsertPosition::BEGIN));
clang_inc_path.append("/cuda_wrappers");
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(clang_inc_path.c_str(), ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-isystem", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-Xclang", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-internal-isystem", ct::ArgumentInsertPosition::BEGIN));
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-Xclang", ct::ArgumentInsertPosition::BEGIN));
// Ensure at least c++11 is used.
std::string stdCpp = "-std=c++11";
#if defined(_MSC_VER)
Expand Down

0 comments on commit 2341994

Please sign in to comment.