Hoist __ImageBase handling into TargetLoweringObjectFileCOFF::lowerRelativeReference, so that all COFF targets get this. Do the same for getSectionForConstant.
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/Target/AArch64/AArch64TargetObjectFile.cpp | ||
---|---|---|
82 ↗ | (On Diff #149983) | 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 | 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.
This doesn't look like something clang-format would produce, consider running git clang-format to reformat the lines touched in the patch.