[PATCH] D77424: [XCOFF][AIX] Relocation support for SymB
Jason Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 11:57:55 PDT 2020
jasonliu marked an inline comment as done.
jasonliu added inline comments.
================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:421
- // If we could not find SymA directly in SymbolIndexMap, this symbol could
- // either be a temporary symbol or an undefined symbol. In this case, we
- // would need to have the relocation reference its csect instead.
- uint32_t Index = SymbolIndexMap.find(&SymA) != SymbolIndexMap.end()
- ? SymbolIndexMap[&SymA]
- : SymbolIndexMap[SymASec->getQualNameSymbol()];
-
+ const uint32_t Index = getIndex(SymA, SymASec);
if (Type == XCOFF::RelocationType::R_POS)
----------------
DiggerLin wrote:
> what about use const auto ?
I'm guessing the reason you mention about "const auto" is that maybe it would help when we have 64 bit.
However, I don't think we made any decision on how to implement 64 bit yet. So I would like to only focus on how this code would work on 32 bit and worry about 64 bit later. So in that case, I don't think we should use auto here, as it would make it very unclear what type we are getting here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77424/new/
https://reviews.llvm.org/D77424
More information about the llvm-commits
mailing list