[PATCH] Use function attribute "trap-func-name" and remove TargetOptions::TrapFuncName

Akira Hatanaka ahatanak at gmail.com
Tue Jun 30 12:30:56 PDT 2015


Thanks.

I realized while reading the review comments that I could attach the attribute to the CallInst instead of the caller function. That way, we can don't have to check that two functions have the same "trap-func-name" value when the functions are inlined or merged.

call void @llvm.trap() #0
...
attributes #0 = { noreturn nounwind "trap-func-name"="foo111" }

Do you see a problem with this approach?


http://reviews.llvm.org/D10832

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list