diff options
author | Adrian Prantl <aprantl@apple.com> | 2013-12-23 23:50:20 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2013-12-23 23:50:20 +0000 |
commit | ad64aeac44841df272456c65e40ece9476ae3b1e (patch) | |
tree | 60a934a5e8a8794d3b0df71bd55ae6a7d8cef78e | |
parent | 0ba77a074093ed29543803031180b34e10f44abd (diff) | |
download | bcm5719-llvm-ad64aeac44841df272456c65e40ece9476ae3b1e.tar.gz bcm5719-llvm-ad64aeac44841df272456c65e40ece9476ae3b1e.zip |
Debug info: Add enumerators to the __apple_names accelerator table.
rdar://problem/11516681.
llvm-svn: 197927
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 | ||||
-rw-r--r-- | llvm/test/DebugInfo/X86/enum-class.ll | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 69240f870f9..df31099b829 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1773,6 +1773,9 @@ void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, DICompositeType CTy) { int64_t Value = Enum.getEnumValue(); addSInt(Enumerator, dwarf::DW_AT_const_value, dwarf::DW_FORM_sdata, Value); + + // Add the enumerator to the __apple_names accelerator table. + addAccelName(Name, Enumerator); } } DIType DTy = resolve(CTy.getTypeDerivedFrom()); diff --git a/llvm/test/DebugInfo/X86/enum-class.ll b/llvm/test/DebugInfo/X86/enum-class.ll index a31e254c24c..e027f9a1a1e 100644 --- a/llvm/test/DebugInfo/X86/enum-class.ll +++ b/llvm/test/DebugInfo/X86/enum-class.ll @@ -1,6 +1,17 @@ ; RUN: llc -O0 -mtriple=x86_64-apple-darwin %s -o %t -filetype=obj ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s +; Also test that the enumerators show up in the __apple_names accelerator table. +; RUN: llc -O0 -mtriple=x86_64-apple-darwin -filetype=asm < %s -o - | FileCheck --check-prefix=ACCEL-CHECK %s +; ACCEL-CHECK: .section __DWARF,__apple_names,regular,debug +; ACCEL-CHECK-NOT: .section +; ACCEL-CHECK: A1 +; ACCEL-CHECK-NOT: .section +; ACCEL-CHECK: C1 +; ACCEL-CHECK-NOT: .section +; ACCEL-CHECK: B1 + + @a = global i32 0, align 4 @b = global i64 0, align 8 @c = global i32 0, align 4 |