Author: spyffe
Date: Mon Nov 10 20:27:22 2014
New Revision: 221658

URL: http://llvm.org/viewvc/llvm-project?rev=221658&view=rev
Log:
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>

Modified:
    
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp

Modified: 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp?rev=221658&r1=221657&r2=221658&view=diff
==============================================================================
--- 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
 (original)
+++ 
lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp
 Mon Nov 10 20:27:22 2014
@@ -98,6 +98,14 @@ AppleObjCTypeEncodingParser::BuildAggreg
     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::BuildAggreg
     }
     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();


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to