[PATCH] D79075: [Object] Change ObjectFile::getSymbolValue() return type to Expected<uint64_t>
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 30 01:49:13 PDT 2020
jhenderson added inline comments.
================
Comment at: llvm/lib/DebugInfo/GSYM/ObjectFileTransformer.cpp:91
+ if (!AddrOrErr) {
+ consumeError(AddrOrErr.takeError());
+ continue;
----------------
Should this either a) be a `cantFail` or b) returned? If the latter, it should be commented with a TODO.
================
Comment at: llvm/lib/XRay/InstrumentationMap.cpp:121-122
+ return ValueOrErr.takeError();
+ uint64_t resolved = Resolver(Reloc, *ValueOrErr, A);
Relocs.insert({Reloc.getOffset(), resolved});
} else if (Reloc.getType() == RelativeRelocation) {
----------------
Whilst you're at it, could you fold these two lines together or at least rename `resolved` to `Resolved`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79075/new/
https://reviews.llvm.org/D79075
More information about the llvm-commits
mailing list