diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-10-03 14:59:42 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-10-03 14:59:42 +0000 |
commit | 70107f989c2e62372b5adc310a95be668b7cb33b (patch) | |
tree | 7b91830d2d5f246fe3382704a9e0f5f5050cd01e /clang/lib/CodeGen | |
parent | cc349c8dd83fb0fdc827c786415bbec629cb05c6 (diff) | |
download | bcm5719-llvm-70107f989c2e62372b5adc310a95be668b7cb33b.tar.gz bcm5719-llvm-70107f989c2e62372b5adc310a95be668b7cb33b.zip |
Propagate __attribute__((returns_twice)) from C to IL.
llvm-svn: 141002
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index eb0dcf3bef9..f52abef3306 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -740,6 +740,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, if (TargetDecl->hasAttr<NoReturnAttr>()) FuncAttrs |= llvm::Attribute::NoReturn; + if (TargetDecl->hasAttr<ReturnsTwiceAttr>()) + FuncAttrs |= llvm::Attribute::ReturnsTwice; + // 'const' and 'pure' attribute functions are also nounwind. if (TargetDecl->hasAttr<ConstAttr>()) { FuncAttrs |= llvm::Attribute::ReadNone; |