[llvm-commits] [PATCH] [MC] .pushsection / .popsection support
Nick Lewycky
nlewycky at google.com
Wed Feb 9 13:29:23 PST 2011
On 9 February 2011 12:28, Joerg Sonnenberger <joerg at britannica.bec.de>wrote:
> Hi all,
> attached patch is the initial support for .pushsection / .popsection.
> To do this properly requires a change in the MCStreamer API. One
> approach is attached. I think a better idea would be to split the
> current SwitchSection() into two parts: the common code to manage
> CurSection / PrevSection and a virtual function ChangeSection that gets
> called if the new CurSection differs from the old one. There are a bunch
> of bugs with the handling of changing to the current section again.
>
Why does this need a second SwitchSection method and why does it need to
take the previous as an argument? Why not just take the current one, then
switch to the new one?
Also, did you check that a .s which consists entirely of ".previous" gives a
nice error? GAS says:
x.s:1: Warning: .previous without corresponding .section; ignored
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110209/c99abcda/attachment.html>
More information about the llvm-commits
mailing list