summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-10-23 17:02:22 +0000
committerAdrian Prantl <aprantl@apple.com>2015-10-23 17:02:22 +0000
commitd43fe0bd39ab70b739123853ebd0c2991512b9d7 (patch)
tree5d7acde54c327aa36118c8d180001686a00fed20
parent8157a8874d239a45622da7d5f9e8e5d08884dea3 (diff)
downloadbcm5719-llvm-d43fe0bd39ab70b739123853ebd0c2991512b9d7.tar.gz
bcm5719-llvm-d43fe0bd39ab70b739123853ebd0c2991512b9d7.zip
Module Debugging: Emit module debug info for types inside of Objective-C
containers. rdar://problem/23196170 llvm-svn: 251120
-rw-r--r--clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp4
-rw-r--r--clang/test/Modules/ExtDebugInfo.m4
-rw-r--r--clang/test/Modules/Inputs/DebugObjC.h10
-rw-r--r--clang/test/Modules/ModuleDebugInfo.m1
4 files changed, 19 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
index 7989b95a568..b397eb352a6 100644
--- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
+++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
@@ -171,6 +171,10 @@ public:
return true;
}
+ void HandleTopLevelDeclInObjCContainer(DeclGroupRef D) override {
+ HandleTopLevelDecl(D);
+ }
+
void HandleTagDeclDefinition(TagDecl *D) override {
if (Diags.hasErrorOccurred())
return;
diff --git a/clang/test/Modules/ExtDebugInfo.m b/clang/test/Modules/ExtDebugInfo.m
index 9bf8bbfbdc8..8e063f09048 100644
--- a/clang/test/Modules/ExtDebugInfo.m
+++ b/clang/test/Modules/ExtDebugInfo.m
@@ -19,6 +19,7 @@
#endif
int foo(ObjCClass *c) {
+ InnerEnum e = e0;
[c instanceMethodWithInt: 0];
return [c property];
}
@@ -30,3 +31,6 @@ int foo(ObjCClass *c) {
// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type,
// CHECK: ![[MOD]] = !DIModule(scope: null, name: {{.*}}DebugObjC
// CHECK-NOT: !DICompositeType(tag: DW_TAG_structure_type,
+// CHECK: !DICompositeType(tag: DW_TAG_enumeration_type,
+// CHECK-SAME: scope: ![[MOD]],
+// CHECK-SAME: flags: DIFlagFwdDecl)
diff --git a/clang/test/Modules/Inputs/DebugObjC.h b/clang/test/Modules/Inputs/DebugObjC.h
index 979871d33c0..bde463abfd6 100644
--- a/clang/test/Modules/Inputs/DebugObjC.h
+++ b/clang/test/Modules/Inputs/DebugObjC.h
@@ -12,3 +12,13 @@
@interface ObjCClass (Category)
- categoryMethod;
@end
+
+@protocol ObjCProtocol
+
+typedef enum {
+ e0 = 0
+} InnerEnum;
+
++ (InnerEnum)protocolMethod;
+
+@end
diff --git a/clang/test/Modules/ModuleDebugInfo.m b/clang/test/Modules/ModuleDebugInfo.m
index 31132c558ca..72f60798a7f 100644
--- a/clang/test/Modules/ModuleDebugInfo.m
+++ b/clang/test/Modules/ModuleDebugInfo.m
@@ -33,6 +33,7 @@
// CHECK: !DISubprogram(name: "+[ObjCClass classMethod]"
// CHECK: !DISubprogram(name: "-[ObjCClass instanceMethodWithInt:]"
// CHECK: !DISubprogram(name: "-[ categoryMethod]"
+// CHECK: !DITypedefType(name: "InnerEnum"
// MODULE-CHECK: !DICompositeType(tag: DW_TAG_structure_type,
// MODULE-CHECK-SAME: name: "FwdDecl",
OpenPOWER on IntegriCloud