[llvm] [clang] [clang, SystemZ] Pass HasDef flag to getMinGlobalAlign(). (PR #73511)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 10:31:45 PST 2024


================
@@ -11,6 +11,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "SystemZ.h"
+#include "clang/AST/Decl.h"
----------------
efriedma-quic wrote:

If I recall correctly, in certain build configurations, like if you enable shared libraries, circular dependencies in libraries can cause link errors.  So we structure code to avoid them.

I'd suggest just splitting getMinGlobalAlign into two functions: getMinGlobalAlign() for all globals, and getMinGlobalAlignDefinition() that only applies to variable definitions.  Then you can put the VarDecl checks into the ASTContext code.

https://github.com/llvm/llvm-project/pull/73511


More information about the llvm-commits mailing list