ahatanak added a comment.

In http://reviews.llvm.org/D15599#325113, @hans wrote:

> Just out of curiosity, where does this come up in practice?


I only have a short test case a user provided so t's not really clear whether 
it was necessary to mark a member function naked or there were other ways to 
get the same behavior. But unless we want to disallow marking member functions 
as naked, we shouldn't let clang crash when it compiles such functions.

> It seems a little backward that we're first emitting a bunch of instructions, 
> only to remove them later. It would be nice if for naked function we wouldn't 
> emit them in the first place. But maybe that's not practical.


I initially tried to block the instructions from being emitted but I ended up 
checking hasAttr<NakedAttr>() in a lot of places. I agree approach taken in 
this patch might look a bit backward, but it seemed better than the alternative.

> Anyway, this seems OK to me but I'd like to hear what Reid thinks too.



http://reviews.llvm.org/D15599



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to