[llvm-commits] [llvm-gcc-4.2] r49171 - in /llvm-gcc-4.2/trunk/gcc: llvm-convert.cpp llvm-types.cpp
Chris Lattner
clattner at apple.com
Sun Apr 6 10:57:47 PDT 2008
On Apr 6, 2008, at 1:32 AM, Duncan Sands wrote:
>> Right. However, I think that this should be handled in the linker.
>> When llvm-link'ing together a function prototype with anything else
>> (a
>> prototype or definition) the possibility of throwing should always
>> win
>> (in other words "resultnothrow = proto1nothrow & proto2nothrow"). If
>> we did this, I don't think there would be a problem.
>
> There indeed wouldn't be a problem. But what I don't understand is
> why
> you guys think it makes sense to mark declarations of external
> functions
> nounwind (because of !flag_exceptions) in the first place.
Duncan beat me over the head on IRC, explaining that this is basically
what the nounwind flag is for on *calls*. He points out that -fno-
exceptions really means that a) no *calls* can throw in the current
translation unit and b) no *function definitions* can throw.
Marking function prototypes as nothrow and then fixing it up in the
linker is more complicated and doesn't provide any value. Dale, what
do you think?
-Chris
More information about the llvm-commits
mailing list