[PATCH] D27411: [Assembler] Better error messages for .org directive
Oliver Stannard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 14 02:53:27 PST 2016
olista01 added inline comments.
Comment at: lib/MC/MCAssembler.cpp:925
+ computeFragmentSize(Layout, *Section.rbegin());
> why do you need to compute the fragment size? Is it for the FragmentOffset parameter in the error message?
The errors are emitted while calculating the fragment size. Previously this just called getFragmentOffset for the last fragment in each section, which caused the size of every fragment except the last to be calculated. I found some cases where the size of the last fragment wasn't evaluated until a later stage. This forces the errors to all be detected at a consistent time.
More information about the llvm-commits