[llvm] [CHERI][RISCV] Do not attempt to pass in an alignment granule for globals with explicit sections. (PR #218189)

Owen Anderson via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 05:01:17 PDT 2026


================
@@ -1333,6 +1333,11 @@ RISCVAsmPrinter::getRequiredGlobalAlignmentGranule(const GlobalVariable &GV) {
   if (!GV.getValueType()->isSized())
     return std::nullopt;
 
+  // When the alignment granule is determined by a CHERI requirement,
+  // don't increase alignment if a custom section has been specified.
----------------
resistor wrote:

Done

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


More information about the llvm-commits mailing list