diff options
author | luxufan <xufan@nj.iscas.ac.cn> | 2022-03-08 13:55:13 +0800 |
---|---|---|
committer | luxufan <luxufan@iscas.ac.cn> | 2022-03-24 00:48:52 +0800 |
commit | 227496dc09cf46df233aad041d6dc6113822e4bb (patch) | |
tree | 81a400be65f73e0829c358e0c4d4dd2a30273d33 /lldb/packages/Python/lldbsuite/test/gdbclientutils.py | |
parent | 5bb5704c1b35023b8a6217a6eb7d98a47efe1ca2 (diff) | |
download | llvm-227496dc09cf46df233aad041d6dc6113822e4bb.zip llvm-227496dc09cf46df233aad041d6dc6113822e4bb.tar.gz llvm-227496dc09cf46df233aad041d6dc6113822e4bb.tar.bz2 |
[RISCV] Generate correct ELF EFlags when .ll file has target-abi attribute
In the past, when construct RISCVAsmBackend, MCTargetOptions.ABIName would be passed and stored in RISCVAsmBackend.
But MCTargetOptions.ABIName can only be specified by -target-abi xxx in command line, if the .ll file has target-abi attribute, the codegen module will ignore it. And the generated object file would have incorrect EFlags value.
https://github.com/llvm/llvm-project/issues/50591 also caused by this problem.
This patch override the AsmPrinter::emitFunctionEntryLabel function and use it to set the target abi value that get from .ll file's target-abi attribute. And storing the target-abi in RISCVTargetStreamer instead of RISCVAsmBackend.
Differential Revision: https://reviews.llvm.org/D121183
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/gdbclientutils.py')
0 files changed, 0 insertions, 0 deletions