[PATCH] D30326: [MS-ABI] Allow #pragma section to choose for ZI data

Javed Absar via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 24 01:48:22 PST 2017


javed.absar created this revision.

This patch enables the msvc pragma section to choose whether zero initialized variables are to be placed in data_seg or bss_seg. The current 
implementation  ignores bss_seg directive for variables that are initialized (i.e. it does not check if the initialization is, in fact, to all zeros). 
This patch now allows that. The variables are now placed in named bss_seg but only so If (a) the initialization is all zeros; AND (b) ''-falways-use-bss flag is set'. In other words, current functionality is not impacted and a useful feature is provided to users.


https://reviews.llvm.org/D30326

Files:
  include/clang/AST/APValue.h
  include/clang/AST/Expr.h
  include/clang/Basic/LangOptions.def
  include/clang/Driver/Options.td
  include/clang/Sema/Sema.h
  lib/AST/APValue.cpp
  lib/AST/Expr.cpp
  lib/Driver/Tools.cpp
  lib/Frontend/CompilerInvocation.cpp
  lib/Sema/SemaDecl.cpp
  test/CodeGenCXX/zi-sections.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30326.89621.patch
Type: text/x-patch
Size: 14703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170224/14e0eca4/attachment.bin>


More information about the cfe-commits mailing list