• fpizlo@apple.com's avatar
    LLVM assertion failures should funnel into WTF's crash handling · cf3ac968
    fpizlo@apple.com authored
    Reviewed by Geoffrey Garen.
    Inside llvmForJSC, we override assertion-related functions and funnel them
    into g_llvmTrapCallback(). We also now register a fatal error handler inside
    the library and funnel that into g_llvmTrapCallback, and have
    initializeAndGetJSCLLVMAPI() take such a callback as an argument.
    Inside JSC, we no longer call LLVMInstallFatalErrorHandler() but instead we
    pass WTFLogAlwaysAndCrash() as the trap callback for llvmForJSC.
    * llvm/InitializeLLVM.cpp:
    * llvm/InitializeLLVMPOSIX.cpp:
    * llvm/library/LLVMExports.cpp:
    * llvm/library/LLVMOverrides.cpp:
    * llvm/library/LLVMTrapCallback.h: Added.
    Reviewed by Geoffrey Garen.
    Give JSC some new toys to play with for crash handling.
    * wtf/Assertions.cpp:
    * wtf/Assertions.h:
    Reviewed by Geoffrey Garen.
    Need to disable LLVM's crash overrides so that we can do our own crash overrides.
    * Scripts/configure-llvm:
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158509 268f45cc-cd09-0410-ab3c-d52691b4dbfc