aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-08-26 00:39:50 +0000
committerDevang Patel <dpatel@apple.com>2009-08-26 00:39:50 +0000
commit8af76bdb7450b097efa17f7c192882111a9e8f10 (patch)
treeeaabc543802e715a02a68e6321661b01e4e700cf /lib/CodeGen
parentad7c3d55932f949e6bd428232999088a53f54a4f (diff)
downloadexternal_llvm-8af76bdb7450b097efa17f7c192882111a9e8f10.zip
external_llvm-8af76bdb7450b097efa17f7c192882111a9e8f10.tar.gz
external_llvm-8af76bdb7450b097efa17f7c192882111a9e8f10.tar.bz2
Add isClosure() predicate. This is used to add DW_AT_APPLE_block attribute.
Patch by Caroline Tice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 067db8b..e053597 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -695,10 +695,7 @@ void DwarfDebug::ConstructTypeDIE(CompileUnit *DW_Unit, DIE &Buffer,
Buffer.AddChild(ElemDie);
}
- // FIXME: We'd like an API to register additional attributes for the
- // frontend to use while synthesizing, and then we'd use that api in clang
- // instead of this.
- if (Name == "__block_literal_generic")
+ if (CTy.isClosure())
AddUInt(&Buffer, dwarf::DW_AT_APPLE_block, dwarf::DW_FORM_flag, 1);
unsigned RLang = CTy.getRunTimeLang();