diff options
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 | ||||
-rw-r--r-- | test/CodeGenObjC/debug-info-selector.m | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index cb907d4515..ecb1760454 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -313,6 +313,12 @@ llvm::DIType CGDebugInfo::CreateType(const BuiltinType *BT) { getOrCreateMainFile(), 0, 0, 0, 0, Elements); } + case BuiltinType::ObjCSel: { + return DBuilder.CreateStructType(TheCU, "objc_selector", + getOrCreateMainFile(), 0, 0, 0, + llvm::DIDescriptor::FlagFwdDecl, + llvm::DIArray()); + } case BuiltinType::UChar: case BuiltinType::Char_U: Encoding = llvm::dwarf::DW_ATE_unsigned_char; break; case BuiltinType::Char_S: diff --git a/test/CodeGenObjC/debug-info-selector.m b/test/CodeGenObjC/debug-info-selector.m new file mode 100644 index 0000000000..67642ac3be --- /dev/null +++ b/test/CodeGenObjC/debug-info-selector.m @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s +// Radar 8494540 + +// CHECK: objc_selector +@interface MyClass { +} +- (id)init; +@end + +@implementation MyClass +- (id) init +{ + return self; +} +@end |