================
@@ -451,6 +451,7 @@ ParsedAST::build(llvm::StringRef Filename, const 
ParseInputs &Inputs,
   DiagnosticConsumer *DiagConsumer = &ASTDiags;
   IgnoreDiagnostics DropDiags;
   if (Preamble) {
+    CI->TargetOpts = Preamble->TargetOpts;
     Patch = PreamblePatch::createFullPatch(Filename, Inputs, *Preamble);
----------------
kadircet wrote:

well, idea also crossed my mind while putting together the patch but wasn't so 
sure if that would be the best place. since preamble-patch'ing was mostly for 
adjusting the compilation to "patch" changes in the preamble contents.

but considering the fact that this actually needs to be done on all the places 
that re-uses a preamble (CodeCompletion, SignatureHelp), I guess PreamblePatch 
is a nice common ground (I was leaning towards `prepareCompilerInstance` but 
unfortunately that one can't depend on Preamble.h :/)

https://github.com/llvm/llvm-project/pull/88381
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to