[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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user