We'd expect the exception to end up in main, an error printed, then
the process exited. However, because "foo" has no unwind info, the
unwinder will abort the process when it gets to the X frame.
I was under the impression that those stack frames would just get
bypassed. However, I wrote a little test program to simulate the
situation and got:
terminate called after throwing an instance of 'std::string'
Aborted
Yep, the problem is that unwind info is needed to restore callee
saved registers, etc. This is why the -fexceptions switch is needed
with C code if you want to unwind across C frames.
So, I'll back out the change until we get LLVM completely EH free in
low-level libraries.
Ok, thanks.
I think the simplest thing to do is to eliminate throws from leaf
code like libsystem etc. Tools like bugpoint can continue to use EH
for as long as we think is reasonable, but the libraries that are
called into by other code should be EH free.
Yes, that's the entire point of PR797. I was just trying to be
incremental about it.
Ok, thanks!
-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits