================
@@ -214,6 +215,12 @@ CreateFrontendAction(CompilerInstance &CI) {
     Act = std::make_unique<ssaf::TUSummaryExtractorFrontendAction>(
         std::move(Act));
   }
+  if (!CI.getSSAFOpts().SourceTransformation.empty() ||
+      !CI.getSSAFOpts().SrcEditFile.empty() ||
+      !CI.getSSAFOpts().TransformationReportFile.empty()) {
+    Act = std::make_unique<ssaf::SourceTransformationFrontendAction>(
----------------
jkorous-apple wrote:

The reason for checking non-emptiness of the other options ones is that we want 
to diagnose missing `--ssaf-source-transformation` option.

I looked into moving these diagnostics to `ParseSSAFArgs` in 
`CompilerInvocation.cpp` but that doesn't work because we need the diagnostics 
to not abort the compilation. Apparently the diagnostics system is not fully 
bootstrapped when we interact with it in `ParseSSAFArgs` so the only kind of 
diagnostics we can produce at that point are errors. The `-Wno-...` suppression 
mechanism also isn't enabled at that point.

https://github.com/llvm/llvm-project/pull/208590
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to