[llvm] MCFragment: Use trailing data for fixed-size part (PR #150846)

Alexis Engelke via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 02:45:35 PDT 2025


================
@@ -520,5 +521,5 @@ void MCMachOStreamer::createAddrSigSection() {
   // (instead of emitting a zero-sized section) so these relocations are
   // technically valid, even though we don't expect these relocations to
   // actually be applied by the linker.
-  Frag->appendContents(8, 0);
+  Frag->setVarContents(std::vector<char>(8, 0));
----------------
aengelke wrote:

constexpr array, no need for a heap allocation here.

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


More information about the llvm-commits mailing list