mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-11 13:37:07 +00:00
Fix problems with programs that prototype printf to something unusual
llvm-svn: 8538
This commit is contained in:
parent
2233d8b00a
commit
584ade803f
@ -987,8 +987,10 @@ void CWriter::visitUnwindInst(UnwindInst &I) {
|
||||
// instruction is found. In this context, we code generated the invoke
|
||||
// instruction to add an entry to the top of the jmpbuf_list. Thus, here we
|
||||
// just have to longjmp to the specified handler.
|
||||
Out << " if (__llvm_jmpbuf_list == 0) { /* llvm.unwind */\n"
|
||||
<< " printf(\"throw found with no handler!\\n\"); abort();\n"
|
||||
Out << " if (__llvm_jmpbuf_list == 0) { /* unwind */\n"
|
||||
<< " extern write();\n"
|
||||
<< " ((void (*)(int, void*, unsigned))write)(2,\n"
|
||||
<< " \"throw found with no handler!\\n\", 31); abort();\n"
|
||||
<< " }\n"
|
||||
<< " longjmp(__llvm_jmpbuf_list->buf, 1);\n";
|
||||
emittedInvoke = true;
|
||||
|
Loading…
Reference in New Issue
Block a user