summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2014-11-11 02:27:22 +0000
committerSean Callanan <scallanan@apple.com>2014-11-11 02:27:22 +0000
commit7db93f70fb0a8a174703c903b83e94cf76dff179 (patch)
tree88d9da91f0861f71ec4c9a6b9290fedc516c06d9
parent360460ba6478cb1cf872abc0ed4423941d790868 (diff)
downloadbcm5719-llvm-7db93f70fb0a8a174703c903b83e94cf76dff179.tar.gz
bcm5719-llvm-7db93f70fb0a8a174703c903b83e94cf76dff179.zip
Ignore templated aggregates in the Objective-C
runtime. This eliminates potential confusion when the compiler has to deal with these weird types later on. One day I'd like to actually generate the proper templates, but this is not the day that I write the parser code to do that. <rdar://problem/18887634> llvm-svn: 221658
-rw-r--r--lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
index 1832b468d23..bfabda95140 100644
--- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
+++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
@@ -98,6 +98,14 @@ AppleObjCTypeEncodingParser::BuildAggregate (clang::ASTContext &ast_ctx, lldb_ut
if (!type.NextIf(opener))
return clang::QualType();
std::string name(ReadStructName(type));
+
+ // We do not handle templated classes/structs at the moment.
+ // If the name has a < in it, we are going to abandon this.
+ // We're still obliged to parse it, so we just set a flag that
+ // means "Don't actually build anything."
+
+ const bool is_templated = name.find('<') != std::string::npos;
+
if (!type.NextIf('='))
return clang::QualType();
bool in_union = true;
@@ -120,6 +128,10 @@ AppleObjCTypeEncodingParser::BuildAggregate (clang::ASTContext &ast_ctx, lldb_ut
}
if (in_union)
return clang::QualType();
+
+ if (is_templated)
+ return clang::QualType(); // This is where we bail out. Sorry!
+
ClangASTContext *lldb_ctx = ClangASTContext::GetASTContext(&ast_ctx);
if (!lldb_ctx)
return clang::QualType();
OpenPOWER on IntegriCloud