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 | 8977c433d3378b59a7b558f148719ce68d169360 (patch) | |
| tree | 5ce2be78755f414085e9fa948e6d1e2a55bc2662 /clang/lib | |
| parent | 30ae06be1495734d4679cdd7db732e02cf56a61c (diff) | |
| download | bcm5719-llvm-8977c433d3378b59a7b558f148719ce68d169360.tar.gz bcm5719-llvm-8977c433d3378b59a7b558f148719ce68d169360.zip | |
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
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 21964d295ea..2253f093df0 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(); |

