[cfe-commits] [patch] Add support for the returns_twice attribute
Eli Friedman
eli.friedman at gmail.com
Thu Sep 29 16:54:12 PDT 2011
2011/9/29 Rafael Ávila de Espíndola <rafael.espindola at gmail.com>:
> The attached patch is the first clang one for PR11038. It makes clang
> propagate the attribute from C the LLVM IL. I still doesn't add it for
> functions known to return twice like setjmp.
>
> Is it OK?
+ if (D->hasAttr<ReturnsTwiceAttr>()) {
+ F->addFnAttr(llvm::Attribute::ReturnsTwice);
+ }
Braces not necessary here.
I think the change in lib/CodeGen/CodeGenModule.cpp is redundant.
Otherwise, fine.
-Eli
More information about the cfe-commits
mailing list