From 8977c433d3378b59a7b558f148719ce68d169360 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 30 Dec 2009 22:06:22 +0000 Subject: [PATCH] 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. llvm-svn: 92316 --- clang/lib/Sema/SemaDecl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 21964d295ea8..2253f093df09 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/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();