[LLVMdev] Turning on exception handling codegen

Bill Wendling isanbard at gmail.com
Fri Aug 24 10:57:31 PDT 2007


On 8/24/07, Bill Wendling <isanbard at gmail.com> wrote:
> On 8/24/07, Chris Lattner <sabre at nondot.org> wrote:
> > > so how about turning it on?
> >
> > It sounds good, but I'm concerned about darwin/x86.  Bill, can you see how
> > well darwin/x86 is doing these days?  If there are no regressions from
> > turning this on by default, we should do it. :)
> >
> I'm assuming that this is 4.2? :-) I'll give it a try.
>
I'm trying it on 4.0. On 4.2, I'm getting this problem during bootstrapping:

ccAMeZbg.s:111:non-relocatable subtraction expression,
"___gxx_personality_v0" minus "L0"
ccAMeZbg.s:111:symbol: "___gxx_personality_v0" can't be undefined in a
subtraction expression

for this reduced testcase:

namespace __cxxabiv1 {
  extern "C" void *__cxa_allocate_exception() throw();
}

int bork(void);

namespace __gnu_cxx {
  inline void __throw_concurrence_unlock_error() {
  }

  struct __mutex {
    void unlock() {
      if (bork() != 0)
        __throw_concurrence_unlock_error();
    }
  };
}

__gnu_cxx::__mutex emergency_mutex;

extern "C" void *__cxxabiv1::__cxa_allocate_exception() throw() {
  emergency_mutex.unlock();
}

I've been looking at it, but haven't been able to spend a lot of time on it.

-bw



More information about the llvm-dev mailing list