Closure is a very generic name. Use AppleBlock instead.
authorDevang Patel <dpatel@apple.com>
Thu, 27 Aug 2009 23:51:51 +0000 (23:51 +0000)
committerDevang Patel <dpatel@apple.com>
Thu, 27 Aug 2009 23:51:51 +0000 (23:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80307 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/DebugInfo.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp

index c0721d33c66a5ef92e3f51843425f75d0367f616..5a9febf54278817d5b7a02b45d7fb581d9a55654 100644 (file)
@@ -169,10 +169,10 @@ namespace llvm {
   class DIType : public DIDescriptor {
   public:
     enum {
-      FlagPrivate   = 1 << 0,
-      FlagProtected = 1 << 1,
-      FlagFwdDecl   = 1 << 2,
-      FlagClosure   = 1 << 3
+      FlagPrivate    = 1 << 0,
+      FlagProtected  = 1 << 1,
+      FlagFwdDecl    = 1 << 2,
+      FlagAppleBlock = 1 << 3
     };
 
   protected:
@@ -224,8 +224,9 @@ namespace llvm {
     bool isForwardDecl() const {
       return (getFlags() & FlagFwdDecl) != 0; 
     }
-    bool isClosure() const {
-      return (getFlags() & FlagClosure) != 0; 
+    // isAppleBlock - Return true if this is the Apple Blocks extension.
+    bool isAppleBlockExtension() const {
+      return (getFlags() & FlagAppleBlock) != 0; 
     }
 
     /// dump - print type.
index 216db9d627756dd4fad716dedccf1f7d384e8bf7..5e99d7d7e98653f055b35607bbaa78e493a53e66 100644 (file)
@@ -689,7 +689,7 @@ void DwarfDebug::ConstructTypeDIE(CompileUnit *DW_Unit, DIE &Buffer,
       Buffer.AddChild(ElemDie);
     }
 
-    if (CTy.isClosure())
+    if (CTy.isAppleBlockExtension())
       AddUInt(&Buffer, dwarf::DW_AT_APPLE_block, dwarf::DW_FORM_flag, 1);
 
     unsigned RLang = CTy.getRunTimeLang();