[cfe-commits] r96635 - in /cfe/trunk/lib/CodeGen: CGBlocks.cpp CGBlocks.h

Blaine Garst blaine at apple.com
Thu Feb 18 16:24:37 PST 2010


Author: blaine
Date: Thu Feb 18 18:24:37 2010
New Revision: 96635

URL: http://llvm.org/viewvc/llvm-project?rev=96635&view=rev
Log:
remove unused function & enumerations

Modified:
    cfe/trunk/lib/CodeGen/CGBlocks.cpp
    cfe/trunk/lib/CodeGen/CGBlocks.h

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Thu Feb 18 18:24:37 2010
@@ -426,40 +426,6 @@
   return GenericBlockLiteralType;
 }
 
-const llvm::Type *BlockModule::getGenericExtendedBlockLiteralType() {
-  if (GenericExtendedBlockLiteralType)
-    return GenericExtendedBlockLiteralType;
-
-  const llvm::Type *BlockDescPtrTy =
-    llvm::PointerType::getUnqual(getBlockDescriptorType());
-
-  const llvm::IntegerType *IntTy = cast<llvm::IntegerType>(
-    getTypes().ConvertType(getContext().IntTy));
-
-  // struct __block_literal_generic {
-  //   void *__isa;
-  //   int __flags;
-  //   int __reserved;
-  //   void (*__invoke)(void *);
-  //   struct __block_descriptor *__descriptor;
-  //   void *__copy_func_helper_decl;
-  //   void *__destroy_func_decl;
-  // };
-  GenericExtendedBlockLiteralType = llvm::StructType::get(IntTy->getContext(),
-                                                          PtrToInt8Ty,
-                                                          IntTy,
-                                                          IntTy,
-                                                          PtrToInt8Ty,
-                                                          BlockDescPtrTy,
-                                                          PtrToInt8Ty,
-                                                          PtrToInt8Ty,
-                                                          NULL);
-
-  getModule().addTypeName("struct.__block_literal_extended_generic",
-                          GenericExtendedBlockLiteralType);
-
-  return GenericExtendedBlockLiteralType;
-}
 
 RValue CodeGenFunction::EmitBlockCallExpr(const CallExpr* E, 
                                           ReturnValueSlot ReturnValue) {

Modified: cfe/trunk/lib/CodeGen/CGBlocks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.h?rev=96635&r1=96634&r2=96635&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.h (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.h Thu Feb 18 18:24:37 2010
@@ -51,10 +51,8 @@
 class BlockBase {
 public:
     enum {
-        BLOCK_NEEDS_FREE =        (1 << 24),
         BLOCK_HAS_COPY_DISPOSE =  (1 << 25),
         BLOCK_HAS_CXX_OBJ =       (1 << 26),
-        BLOCK_IS_GC =             (1 << 27),
         BLOCK_IS_GLOBAL =         (1 << 28),
         BLOCK_HAS_DESCRIPTOR =    (1 << 29),
         BLOCK_HAS_OBJC_TYPE  =    (1 << 30)
@@ -80,7 +78,6 @@
   const llvm::Type *getBlockDescriptorType();
 
   const llvm::Type *getGenericBlockLiteralType();
-  const llvm::Type *getGenericExtendedBlockLiteralType();
 
   llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE, const char *);
 
@@ -94,7 +91,7 @@
 
   const llvm::Type *BlockDescriptorType;
   const llvm::Type *GenericBlockLiteralType;
-  const llvm::Type *GenericExtendedBlockLiteralType;
+
   struct {
     int GlobalUniqueCount;
   } Block;
@@ -111,7 +108,7 @@
     : Context(C), TheModule(M), TheTargetData(TD), Types(T),
       CGM(CodeGen), VMContext(M.getContext()),
       NSConcreteGlobalBlock(0), NSConcreteStackBlock(0), BlockDescriptorType(0),
-      GenericBlockLiteralType(0), GenericExtendedBlockLiteralType(0),
+      GenericBlockLiteralType(0),
       BlockObjectAssign(0), BlockObjectDispose(0) {
     Block.GlobalUniqueCount = 0;
     PtrToInt8Ty = llvm::Type::getInt8PtrTy(M.getContext());





More information about the cfe-commits mailing list