[PATCH] D97982: [MC] Introduce NeverAlign fragment type
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 4 12:33:18 PDT 2021
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:4745
+ AsmToken::EndOfStatement,
+ "unexpected token in '.avoid_end_align' directive"))
+ return true;
----------------
No need to mention the directive name. The diagnostic uses caret to highlight to user input.
================
Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:4749
+ if (Alignment <= 0) {
+ Error(AlignmentLoc, "'.avoid_end_align' directive with non-positive size");
+ return false;
----------------
ditto
================
Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:4753
+
+ /// Emit NeverAlign
+ getParser().getStreamer().emitNeverAlignCodeAtEnd(Alignment);
----------------
The code is self-explanatory
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97982/new/
https://reviews.llvm.org/D97982
More information about the llvm-commits
mailing list