[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

Alexander Richardson via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 6 10:21:47 PST 2025


================
@@ -715,8 +715,16 @@ MCSymbol *AsmPrinter::getSymbolPreferLocal(const GlobalValue &GV) const {
   return TM.getSymbol(&GV);
 }
 
-/// EmitGlobalVariable - Emit the specified global variable to the .s file.
 void AsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
+  MaybeAlign RequiredAlignment = getRequiredGlobalAlignment(*GV);
----------------
arichardson wrote:

Should we also do this in `AsmPrinter::emitGlobalConstant`? 

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


More information about the cfe-commits mailing list