[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
[ROCm/hip commit: 24be21495d]
This commit is contained in:
@@ -484,6 +484,11 @@ public:
|
||||
|
||||
}
|
||||
|
||||
bool HipifyAction::BeginInvocation(clang::CompilerInstance &CI) {
|
||||
llcompat::RetainExcludedConditionalBlocks(CI);
|
||||
return true;
|
||||
}
|
||||
|
||||
void HipifyAction::ExecuteAction() {
|
||||
clang::Preprocessor& PP = getCompilerInstance().getPreprocessor();
|
||||
clang::SourceManager& SM = getCompilerInstance().getSourceManager();
|
||||
|
||||
Reference in New Issue
Block a user