From: Chris Lattner Date: Wed, 30 Dec 2009 22:06:22 +0000 (+0000) Subject: when making a decl for __builtin_fabsf() make sure to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=551f7087786d1a5e257f4e2a0999da8c709437fd;p=clang when making a decl for __builtin_fabsf() make sure to attach the appropriate attributes to it. I don't think this manifests as any real change though, we're still not getting the right LLVM IR attributes out of codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92316 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 21964d295e..2253f093df 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -4461,6 +4461,10 @@ void Sema::AddKnownFunctionAttributes(FunctionDecl *FD) { if (Context.BuiltinInfo.isNoReturn(BuiltinID)) FD->addAttr(::new (Context) NoReturnAttr()); + if (Context.BuiltinInfo.isNoThrow(BuiltinID)) + FD->addAttr(::new (Context) NoThrowAttr()); + if (Context.BuiltinInfo.isConst(BuiltinID)) + FD->addAttr(::new (Context) ConstAttr()); } IdentifierInfo *Name = FD->getIdentifier();