https://bugs.llvm.org/show_bug.cgi?id=45171

Quentin Brooks <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |---
             Status|RESOLVED                    |REOPENED

--- Comment #3 from Quentin Brooks <[email protected]> ---
Thanks Heejin for taking a look! I did some more testing and I think my repro
was actually not specific enough.

I think the actual bug is that clang 9 is now using "typeinfo"s for types that
are thrown, where clang 8 did not. My corrected example (works on clang 8,
doesn't on clang 9) would be:

    clang --target=wasm32 -nostdlib -H -Wl,--no-entry -Wl,--allow-undefined
-Wl,--export-dynamic -fvisibility=hidden ./test.cpp

./test.cpp
    extern "C" {
        void* __cxa_allocate_exception(unsigned int thrown_size) { return
nullptr; }
        void __cxa_throw(void* thrown_object, void* type, void(*dest)(void*)) {
}
    }

    __attribute__((visibility("default"))) void testThrow() {
        throw "test";
    }

It seems that if exceptions require "typeinfo for char const*", it should be
moved out of libc++abi and into clang. I feel like exceptions are more part of
the language, and less a standard library thing, but maybe I'm wrong.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to