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

Jonas Paulsson via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 9 14:27:14 PST 2024


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

What is the motivation for this? I mean, is there any general consensus that this really should be avoided for the purpose of building the tests (note that clang itself builds fine)?  Why did you remove clangAST from the cmake file to begin with - was there some discussion preceding this?

The reason I am passing the VarDecl to the target is that in order to have the (systemz) target return a minimum alignment value it needs to know things about the Variable. Since this is very target specific, it would be a bit weird to have in common code something like isVarExternalOrWeak(), or would it not? AFIK this is only relevant for SystemZ so it would be best to only do this check in the target. Besides, if some other target needs to check something else, it could do so if the *VD is there.

@efriedma-quic do you have any opinion?

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


More information about the cfe-commits mailing list