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

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 13:10:54 PST 2017


rnk added a comment.

This functionality doesn't feel worth a driver flag. It customizes a very small aspect of a Microsoft extension that was only implemented for compatibility. It also reimplements the logic that LLVM uses in the backend to put global variables in .bss or .data. Can you elaborate on the actual use case? Is the goal to put all globals that would normally live in .bss into a custom section? If so, I think we should implement our own pragma to do that rather than piggybacking on the Microsoft one.



================
Comment at: lib/AST/Expr.cpp:2841
+/// Returns true if the initializer is all zeros.
+bool Expr::isZeroInitializer(ASTContext &Ctx, bool IsForRef,
+                             const Expr **Culprit) const {
----------------
I seriously doubt we need this much code to check if something is a zero. I'm sure we already have a way to do this.


https://reviews.llvm.org/D30326





More information about the cfe-commits mailing list