matinraayai wrote:

@MatzeB @arsenm in the latest commit I had to fix the issue you ran into in the 
following links @arsenm mentioned earlier:
https://lists.llvm.org/pipermail/llvm-dev/2017-October/117907.html

https://reviews.llvm.org/D38482
https://reviews.llvm.org/D38489

I can live with `TargetMachine` and `LLVMTargetMachine` being separate 
entities, with `TargetMachine` being the "frontend" and `LLVMTargetMachine` 
being any concrete subclass with codegen support as @MatzeB explained in the 
past.

With this patch, if any library requires MC code emission of any kind, it has 
to explicitly link to libCodeGen, since it has to be able to access the `MMI` 
constructor/destructor. I still believe that `addPassesToEmitMC` and 
`addPassesToEmitFile` need to be moved to `LLVMTargetMachine` to further 
enforce the distinction between `LLVMTargetMachine` and `TargetMachine`, as 
well as any other interface that explicitly uses CodeGen or MC primitives (e.g. 
MachineFunctionInfoYaml things).

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

Reply via email to