Don't completely drop methods we don't want to put
into a CXXRecordDecl on the ground; rather, put
them into the translation unit as functions.

<rdar://problem/13834404>

llvm-svn: 181560
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index cbed4f2..dd34a36 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -6302,6 +6302,8 @@
                                                          is_variadic, 
                                                          type_quals);
                     
+                    bool ignore_containing_context = false;
+                    
                     if (type_name_cstr)
                     {
                         bool type_handled = false;
@@ -6520,7 +6522,7 @@
                                                     }
                                                     else
                                                     {
-                                                        return TypeSP();
+                                                        ignore_containing_context = true;
                                                     }
                                                 }
                                             }
@@ -6562,7 +6564,7 @@
                         if (!type_handled)
                         {
                             // We just have a function that isn't part of a class
-                            clang::FunctionDecl *function_decl = ast.CreateFunctionDeclaration (containing_decl_ctx,
+                            clang::FunctionDecl *function_decl = ast.CreateFunctionDeclaration (ignore_containing_context ? GetClangASTContext().GetTranslationUnitDecl() : containing_decl_ctx,
                                                                                                 type_name_cstr, 
                                                                                                 clang_type, 
                                                                                                 storage,