Open
Description
https://llvm.godbolt.org/z/4hhf36Wf8
declare void @personality()
declare void @nounwind_decl() nounwind
declare void @nounwind_call()
define void @test_nounwind_decl() personality ptr @personality {
call void @nounwind_decl()
ret void
}
define void @test_nounwind_call() personality ptr @personality {
call void @nounwind_call() nounwind
ret void
}
define void @test_memset(ptr %p) personality ptr @personality {
call void @llvm.memset(ptr %p, i8 0, i64 1000, i1 false)
ret void
}
In this example, the gcc_except_table section for test_nounwind_decl
does not contain information about the call (as the declaration is nounwind), but the sections for test_nounwind_call
and test_memset
do contain it.
This is because
looks at the attributes of a Function operand of the call. This does not work if the call-site was markednounwind
, or if it's a libcall lowering, e.g. of an intrinsic.