[cfe-commits] r65056 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGen/attr-noinline.c

Anders Carlsson andersca at mac.com
Thu Feb 19 11:22:11 PST 2009


Author: andersca
Date: Thu Feb 19 13:22:11 2009
New Revision: 65056

URL: http://llvm.org/viewvc/llvm-project?rev=65056&view=rev
Log:
Add irgen support for the noinline attribute.

Added:
    cfe/trunk/test/CodeGen/attr-noinline.c
Modified:
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=65056&r1=65055&r2=65056&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Feb 19 13:22:11 2009
@@ -339,6 +339,9 @@
 
   if (D->getAttr<AlwaysInlineAttr>())
     F->addFnAttr(llvm::Attribute::AlwaysInline);
+  
+  if (D->getAttr<NoinlineAttr>())
+    F->addFnAttr(llvm::Attribute::NoInline);
 }
 
 void CodeGenModule::SetMethodAttributes(const ObjCMethodDecl *MD,

Added: cfe/trunk/test/CodeGen/attr-noinline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/attr-noinline.c?rev=65056&view=auto

==============================================================================
--- cfe/trunk/test/CodeGen/attr-noinline.c (added)
+++ cfe/trunk/test/CodeGen/attr-noinline.c Thu Feb 19 13:22:11 2009
@@ -0,0 +1,9 @@
+// RUN: clang -g -emit-llvm -o %t %s &&
+// RUN: grep 'noinline' %t
+
+void t1() __attribute__((noinline));
+
+void t1()
+{
+}
+





More information about the cfe-commits mailing list