[flang-commits] [flang] [flang] Updating drivers to create data layout before semantics (PR #73301)

via flang-commits flang-commits at lists.llvm.org
Mon Nov 27 02:15:39 PST 2023


jeanPerier wrote:




> > I think that my suggestion could be implemented by extracting `TargetMachine` logic out of `setUpTargetCharacteristics`?
> 
> I want a single place where the evaluate::TargetCharacteristics is being set-up, and it will need an llvm::DataLayout, which can only be obtained from an llvm::TargetMachine.
> 
> The other solution is to move the SemanticContext outside of CompilerInvocation, but I am not sure of the implications. Would that be possible?

@banach-space, alternatively, would it be OK to move the llvm::TargetMachine into the `CompilerInstance` class where the call to set-up the SemanticContext is done?

https://github.com/llvm/llvm-project/pull/73301


More information about the flang-commits mailing list