Skip to content

Commit

Permalink
Merge pull request #889 from emankov/master
Browse files Browse the repository at this point in the history
[HIPIFY] Introduce Verbose '-v' option as hipify's own
  • Loading branch information
emankov authored Jan 30, 2019
2 parents 4158c7e + ce28bc7 commit 9a5dc9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hipify-clang/src/ArgParse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ cl::opt <bool> SaveTemps("save-temps",
cl::value_desc("save-temps"),
cl::cat(ToolTemplateCategory));

cl::opt <bool> Verbose("v",
cl::desc("Show commands to run and use verbose output"),
cl::value_desc("v"),
cl::cat(ToolTemplateCategory));

cl::opt <bool> TranslateToRoc("roc",
cl::desc("Translate to roc instead of hip where it is possible"),
cl::value_desc("roc"),
Expand Down
1 change: 1 addition & 0 deletions hipify-clang/src/ArgParse.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extern cl::list<std::string> IncludeDirs;
extern cl::list<std::string> MacroNames;
extern cl::opt<bool> Inplace;
extern cl::opt<bool> SaveTemps;
extern cl::opt<bool> Verbose;
extern cl::opt<bool> NoBackup;
extern cl::opt<bool> NoOutput;
extern cl::opt<bool> PrintStats;
Expand Down
3 changes: 3 additions & 0 deletions hipify-clang/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ int main(int argc, const char **argv) {
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster(s.c_str(), ct::ArgumentInsertPosition::END));
}
}
if (Verbose) {
Tool.appendArgumentsAdjuster(ct::getInsertArgumentAdjuster("-v", ct::ArgumentInsertPosition::END));
}
Tool.appendArgumentsAdjuster(ct::getClangSyntaxOnlyAdjuster());
Statistics& currentStat = Statistics::current();
// Hipify _all_ the things!
Expand Down

0 comments on commit 9a5dc9f

Please sign in to comment.