[PATCH] D70062: MCObjectStreamer: assign MCSymbols in the dummy fragment to offset 0.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 10:49:46 PST 2019


jyknight added inline comments.


================
Comment at: llvm/lib/MC/MCObjectStreamer.cpp:261
   else
     PendingLabels.push_back(Symbol);
 }
----------------
peter.smith wrote:
> For consistency is it worth setting the offset to 0 here as well? From what I can tell this is only used for outputting Arm/Thumb mapping symbols and these really shouldn't be used for any kind of symbolic lookup, but it may be possible other uses for this function will be found in the future.
Agreed.

This function's semantics seem kinda broken, since sometimes it sets offset and sometimes doesn't. (shouldn't matter for the only current usage). So, refactored a bit, and done.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70062/new/

https://reviews.llvm.org/D70062





More information about the llvm-commits mailing list