[PATCH] D96409: [debug-info] refactor emitDwarfUnitLength

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 05:38:02 PST 2021


shchenz added inline comments.


================
Comment at: llvm/lib/MC/MCStreamer.cpp:1013-1014
   AddComment(Comment);
+  MCSymbol *Lo = Context.createTempSymbol(Prefix + "start");
+  MCSymbol *Hi = Context.createTempSymbol(Prefix + "end");
+
----------------
ikudrin wrote:
> shchenz wrote:
> > ikudrin wrote:
> > > Maybe use `"_start"` and `"_end"` here and avoid passing the trailing `'_'` in the argument?
> > hmm, if `Prefix` is passed as `""`, will it be a little strange to have a label like: `.L_start0`?
> The signature of the method does not encourage a caller to pass an empty string because there is no default value for the argument. To gracefully support the empty string, it would be better not to add a suffix in that case. But we probably do not need that kind of fine-tuning right now.
OK, I will update this later.  Thanks. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96409



More information about the llvm-commits mailing list