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 | f87cced71a955dca5731e7b28bc182e4824c0355 (patch) | |
tree | 49364a958fa41749608f1c9a91e93732fd3d61e8 /lib/CodeGen/CGCall.cpp | |
parent | c5306b0b8595a1a7800d9c5e75de4f5b9f860efd (diff) |
Propagate __attribute__((returns_twice)) from C to IL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index eb0dcf3bef..f52abef330 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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; |