[PATCH] D89072: [CodeView] Emit static data members as S_CONSTANTs.

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 16:30:36 PDT 2020


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

Looks good with a test for explicit zero initialization.



================
Comment at: llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp:3157
+
+    if (Value.isNullValue())
+      continue;
----------------
What about zero constants like:
  struct Foo {
    static const int sdm = 0;
  };

I think isNullValue just compares against zero, so that's not quite right. Maybe structure it as `if ConstantInt / else if ConstantFP / else continue`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89072



More information about the llvm-commits mailing list