[PATCH] D92507: [ms] [llvm-ml] Add support for ALIGN, EVEN, and ORG directives
Eric Astor via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 9 21:20:45 PDT 2021
epastor requested review of this revision.
epastor marked an inline comment as done.
epastor added inline comments.
================
Comment at: llvm/lib/MC/MCParser/MasmParser.cpp:3539
Field.LengthOf = IntInfo.Values.size();
- if (Struct.IsUnion)
- Struct.Size = std::max(Struct.Size, Field.SizeOf);
- else
- Struct.Size += Field.SizeOf;
+ Struct.Size = std::max(Struct.Size, Field.Offset + Field.SizeOf);
return false;
----------------
thakis wrote:
> we do this in a bunch of places -- maybe Struct should have a updateSizeForField()?
>
> Many of these "add a field" functions look a bit repetitive -- not sure if that's the best way to cut back on that, or if there's a bigger win to be had.
We should definitely do a rework of this. I'll see what I can do in a followup commit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92507/new/
https://reviews.llvm.org/D92507
More information about the llvm-commits
mailing list