[PATCH] D150221: Add option -fkeep-static-variables to emit all static variables

Zheng Qian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 9 12:48:08 PDT 2023


qianzhen created this revision.
Herald added a project: All.
qianzhen requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

This patch adds a new option -fkeep-static-variables to emit all static variables if required. This could be useful in cases where the presence of all static variables as symbols in the object file are required.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150221

Files:
  clang/include/clang/Basic/CodeGenOptions.def
  clang/include/clang/Driver/Options.td
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGen/keep-static-variables.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150221.520794.patch
Type: text/x-patch
Size: 4761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230509/19efe22b/attachment.bin>


More information about the cfe-commits mailing list