diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index cb907d451589..ecb1760454d7 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/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/clang/test/CodeGenObjC/debug-info-selector.m b/clang/test/CodeGenObjC/debug-info-selector.m new file mode 100644 index 000000000000..67642ac3bebe --- /dev/null +++ b/clang/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