From a1ba269a27ca9d776e6de77e8177fa8fa844bd5e Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 27 Aug 2009 23:51:51 +0000 Subject: [PATCH] Closure is a very generic name. Use AppleBlock instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80307 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/DebugInfo.h | 13 +++++++------ lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index c0721d33c66..5a9febf5427 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -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. diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 216db9d6277..5e99d7d7e98 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -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(); -- 2.34.1