[PATCH] D65159: [PowerPC][XCOFF] Adds support for writing the .bss section for object files.

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 12:56:02 PDT 2019


DiggerLin added inline comments.


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:186
+  for (auto *Sec : Sections)
+    Sec->reset();
+  Sections.clear();
----------------
DiggerLin wrote:
> the element of the sections is cleared, I do no think  we need to reset every element here
Sorry, please ignore the comment, the Sections is the vector of Section*.


================
Comment at: llvm/lib/MC/XCOFFObjectWriter.cpp:118
+        Index(-1), IsVirtual(IsVirtual) {
+    strncpy(Name, N, XCOFF::NameSize);
+  }
----------------
Do we need to add assert here for the strlen(N) <= XCOFF::NameSize ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65159





More information about the llvm-commits mailing list