[cfe-commits] r125163 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-selector.m
Devang Patel
dpatel at apple.com
Tue Feb 8 19:15:05 PST 2011
Author: dpatel
Date: Tue Feb 8 21:15:05 2011
New Revision: 125163
URL: http://llvm.org/viewvc/llvm-project?rev=125163&view=rev
Log:
Emit debug info for objc_selector.
Added:
cfe/trunk/test/CodeGenObjC/debug-info-selector.m
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=125163&r1=125162&r2=125163&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Feb 8 21:15:05 2011
@@ -313,6 +313,12 @@
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:
Added: cfe/trunk/test/CodeGenObjC/debug-info-selector.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-selector.m?rev=125163&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-selector.m (added)
+++ cfe/trunk/test/CodeGenObjC/debug-info-selector.m Tue Feb 8 21:15:05 2011
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// Radar 8494540
+
+// CHECK: objc_selector
+ at interface MyClass {
+}
+- (id)init;
+ at end
+
+ at implementation MyClass
+- (id) init
+{
+ return self;
+}
+ at end
More information about the cfe-commits
mailing list