[Lldb-commits] [PATCH] D13270: Remove instance reference to static member function

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 29 13:56:42 PDT 2015


zturner created this revision.
zturner added a reviewer: clayborg.
zturner added a subscriber: lldb-commits.

Hi Greg,

This patch is pretty straightforward, but I'm posting it here because the fact that you were explicitly casting to reference through an instance suggests that maybe there's a design problem you overlooked.  OTOH, it's possible this patch is fine.  LMK

http://reviews.llvm.org/D13270

Files:
  source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp

Index: source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -1597,15 +1597,14 @@
     bool
     Finalize()
     {
-        ClangASTContext *ast = llvm::cast<ClangASTContext>(m_class_opaque_type.GetTypeSystem());
-        return ast->AddObjCClassProperty (m_class_opaque_type,
-                                          m_property_name,
-                                          m_property_opaque_type,
-                                          m_ivar_decl,
-                                          m_property_setter_name,
-                                          m_property_getter_name,
-                                          m_property_attributes,
-                                          m_metadata_ap.get());
+        return ClangASTContext::AddObjCClassProperty (m_class_opaque_type,
+                                                      m_property_name,
+                                                      m_property_opaque_type,
+                                                      m_ivar_decl,
+                                                      m_property_setter_name,
+                                                      m_property_getter_name,
+                                                      m_property_attributes,
+                                                      m_metadata_ap.get());
     }
 
 private:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13270.36033.patch
Type: text/x-patch
Size: 1545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150929/b7e895cd/attachment.bin>


More information about the lldb-commits mailing list