From 70107f989c2e62372b5adc310a95be668b7cb33b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Mon, 3 Oct 2011 14:59:42 +0000 Subject: Propagate __attribute__((returns_twice)) from C to IL. llvm-svn: 141002 --- clang/lib/CodeGen/CGCall.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/CodeGen') 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()) FuncAttrs |= llvm::Attribute::NoReturn; + if (TargetDecl->hasAttr()) + FuncAttrs |= llvm::Attribute::ReturnsTwice; + // 'const' and 'pure' attribute functions are also nounwind. if (TargetDecl->hasAttr()) { FuncAttrs |= llvm::Attribute::ReadNone; -- cgit v1.2.3