[HIPIFY] Introduce '-D' option as hipify-clang's one

+ '-D' might be set as hipify-clang option (before separator '--' or without specifying separator at all);
+ '-D' as a clang option might be specified as well (after options separator '--');
+ All defines specified as hipify-clang defines (before options separator '--') will be set after clang's ones and will redefine the same clang's ones.
This commit is contained in:
Evgeny Mankov
2019-01-14 19:34:42 +03:00
parent 93aeb04cec
commit 13ffeb47ce
3 changed files with 15 additions and 1 deletions
+8 -1
View File
@@ -85,7 +85,7 @@ cl::opt<bool> Examine("examine",
cl::cat(ToolTemplateCategory));
cl::opt<bool> DashDash("-",
cl::desc("Separator between hipify-clang and clang options;\ndon't specify if there are no clang options."),
cl::desc("Separator between hipify-clang and clang options;\ndon't specify if there are no clang options"),
cl::value_desc("--"),
cl::cat(ToolTemplateCategory));
@@ -96,4 +96,11 @@ cl::list<std::string> I("I",
cl::Prefix,
cl::cat(ToolTemplateCategory));
cl::list<std::string> D("D",
cl::desc("Define <macro> to <value> or 1 if <value> omitted"),
cl::value_desc("macro>=<value"),
cl::ZeroOrMore,
cl::Prefix,
cl::cat(ToolTemplateCategory));
cl::extrahelp CommonHelp(ct::CommonOptionsParser::HelpMessage);