[PATCH] D126257: Round up zero-sized symbols to 1 byte in `.debug_aranges`.
    David Blaikie via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May 23 17:23:59 PDT 2022
    
    
  
dblaikie added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:3053-3059
+        // Pretend that zero-sized symbols have length 1. The DWARF specification
+        // requires that entries in this table have nonzero lengths.
+        if (Size == 0) {
+          Expr = MCBinaryExpr::createAdd(Expr,
+                                         MCConstantExpr::create(1, Context),
+                                         Context);
+        }
----------------
Does this need to be an MCExpr? Rather than a hardcoded value of `1` (which would seem simpler)?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126257/new/
https://reviews.llvm.org/D126257
    
    
More information about the llvm-commits
mailing list