[PATCH] D66642: [yaml2obj] - Don't allow setting StOther and Other/Visibility at the same time.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 24 10:02:46 PDT 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: lib/ObjectYAML/ELFEmitter.cpp:471
+    else if (Sym.StOther)
+      Symbol.st_other = *Sym.StOther;
+
----------------
MaskRay wrote:
> jhenderson wrote:
> > I just want to be clear that st_other is zero-initialized?
> It is uninitialized.
> It is uninitialized.

I think you're mistaken. It should be initialized because of 'Ret.resize(Symbols.size() + 1)' call. It is value initialized, i.e. zero initialized in this case.
(https://en.cppreference.com/w/cpp/container/vector/resize).

That is how it works for `st_name` or `st_shndx` I think. Am I missing something?




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

https://reviews.llvm.org/D66642





More information about the llvm-commits mailing list