Hoist __ImageBase handling into TargetLoweringObjectFileCOFF::lowerRelativeReference, so that all COFF targets get this. Do the same for getSectionForConstant.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/AArch64/AArch64TargetObjectFile.cpp | ||
---|---|---|
82 | Rather than duplicate this, I think we should hoist __ImageBase handling into TargetLoweringObjectFileCOFF::lowerRelativeReference, so that all COFF targets get this. Also, do you think you'll need to do the same for getSectionForConstant? |
Comment Actions
Needs a test. I think you can copy llvm/test/MC/COFF/ir-to-imgrel.ll to llvm/test/MC/AArch64/ and modify it accordingly. The test is kind of in the wrong location, though. It should really be in llvm/test/CodeGen/(X86|AArch64), since it's an llc test.
include/llvm/CodeGen/TargetLoweringObjectFileImpl.h | ||
---|---|---|
167–168 ↗ | (On Diff #150108) | This doesn't look like something clang-format would produce, consider running git clang-format to reformat the lines touched in the patch. |
Comment Actions
Thank you for reviewing Reid. Please could you commit the change for me as I don't have commit rights.
Rather than duplicate this, I think we should hoist __ImageBase handling into TargetLoweringObjectFileCOFF::lowerRelativeReference, so that all COFF targets get this.
Also, do you think you'll need to do the same for getSectionForConstant?