[Lldb-commits] [PATCH] D72624: [WIP] TargetMachine Hook for Module Metadata

Kuan Hsu Chen (Zakk) via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 14 05:07:36 PST 2020


khchen added a comment.

In D72624#1818605 <https://reviews.llvm.org/D72624#1818605>, @khchen wrote:

> I think putting the resetTargetDefaultOptions after instance of TargetMachine is too late.
>  for example: 
>  ppc <https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp#L293-L304> and mips <https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/Mips/MipsTargetMachine.cpp#L111-L122> compute the TargetABI in XXXXTargetMachine constructor. In addition , mips <https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/Mips/MipsTargetMachine.cpp#L67> compute the DataLayout with target ABI in TargetMachine constructor.


Sorry, I didn't notice the resetTargetDefaultOptions is a virtual function, so the backend need to care this issue themselves if they want take this approach. 
I think this approach is better than D72245 <https://reviews.llvm.org/D72245>.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72624/new/

https://reviews.llvm.org/D72624





More information about the lldb-commits mailing list