[HIPIFY][#207][fix] Translate all preprocessor's conditional blocks

+ Start to translate preprocessor's false conditional blocks too:
  based on clang's https://reviews.llvm.org/D66597;
  available only starting from LLVM 10.0 or trunk.
+ Option -skip-excluded-preprocessor-conditional-blocks for skipping excluded conditional blocks:
  the default behavior for hipify-clang built with LLVM < 10.0;
  false by default for hipify-clang built with LLVM 10 or trunk.
+ Add 4 preprocessor unit tests, 2 of which are LLVM 10.0 only
+ Update couple of existing tests by setting -skip-excluded-preprocessor-conditional-blocks option:
  update lit testing accordingly
This commit is contained in:
Evgeny Mankov
2019-08-28 21:17:35 +03:00
parent 1ab81d9ce6
commit 24be21495d
15 changed files with 223 additions and 12 deletions
+5
View File
@@ -138,4 +138,9 @@ cl::list<std::string> MacroNames("D",
cl::Prefix,
cl::cat(ToolTemplateCategory));
cl::opt<bool> SkipExcludedPPConditionalBlocks("skip-excluded-preprocessor-conditional-blocks",
cl::desc("Enable default preprocessor behaviour by skipping undefined conditional blocks"),
cl::value_desc("skip-excluded-preprocessor-conditional-blocks"),
cl::cat(ToolTemplateCategory));
cl::extrahelp CommonHelp(ct::CommonOptionsParser::HelpMessage);