[cfe-commits] r43429 - /cfe/trunk/CodeGen/CGBuiltin.cpp

Anders Carlsson andersca at mac.com
Sun Oct 28 19:59:40 PDT 2007


Author: andersca
Date: Sun Oct 28 21:59:40 2007
New Revision: 43429

URL: http://llvm.org/viewvc/llvm-project?rev=43429&view=rev
Log:
Generate code for __builtin_classify_type.

Modified:
    cfe/trunk/CodeGen/CGBuiltin.cpp

Modified: cfe/trunk/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CGBuiltin.cpp?rev=43429&r1=43428&r2=43429&view=diff

==============================================================================
--- cfe/trunk/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/CodeGen/CGBuiltin.cpp Sun Oct 28 21:59:40 2007
@@ -63,7 +63,15 @@
 
     return RValue::get(V);
   }
+  case Builtin::BI__builtin_classify_type: {
+    llvm::APSInt Result(32);
+    
+    if (!E->isBuiltinClassifyType(Result))
+      assert(0 && "Expr not __builtin_classify_type!");
+    
+    return RValue::get(llvm::ConstantInt::get(Result));
   }
-      
+  }
+  
   return RValue::get(0);
 }





More information about the cfe-commits mailing list