[llvm] [RISCV] Move the emitValueToAlignment before the header in emitNoteGnuPropertySection. (PR #151436)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 30 20:06:44 PDT 2025
================
@@ -97,7 +98,6 @@ void RISCVTargetStreamer::emitNoteGnuPropertySection(
// Emit n_desc field
OutStreamer.emitLabel(NDescBeginSym);
- OutStreamer.emitValueToAlignment(NoteAlign);
// Emit the feature_1_and property
OutStreamer.emitIntValue(ELF::GNU_PROPERTY_RISCV_FEATURE_1_AND, 4); // pr_type
----------------
MaskRay wrote:
We should remove the second `OutStreamer.emitValueToAlignment(NoteAlign); // pr_padding` as well. The Streamer user should track whether the current location is aligned, and if aligned, should not call `emitValueToAlignment`.
https://github.com/llvm/llvm-project/pull/151436
More information about the llvm-commits
mailing list