diff options
author | Chris Lattner <sabre@nondot.org> | 2009-12-30 22:06:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-12-30 22:06:22 +0000 |
commit | 551f7087786d1a5e257f4e2a0999da8c709437fd (patch) | |
tree | f50c1c1a47a588ebba2b8dd86186e25b2774abbd /lib | |
parent | f2017d13ebd4a617415d737fa99c7e013b4d5dd9 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |