[cfe-commits] r92316 - /cfe/trunk/lib/Sema/SemaDecl.cpp

Chris Lattner sabre at nondot.org
Wed Dec 30 14:06:23 PST 2009


Author: lattner
Date: Wed Dec 30 16:06:22 2009
New Revision: 92316

URL: http://llvm.org/viewvc/llvm-project?rev=92316&view=rev
Log:
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.

Modified:
    cfe/trunk/lib/Sema/SemaDecl.cpp

Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=92316&r1=92315&r2=92316&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Dec 30 16:06:22 2009
@@ -4461,6 +4461,10 @@
 
     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();





More information about the cfe-commits mailing list