[Lldb-commits] [PATCH] D12658: Search variables based on clang::DeclContext and clang::Decl tree

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 14:59:05 PDT 2015


clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Looks good as long as my inlined comment doesn't point out an error, then this is good to go! Good stuff.


================
Comment at: source/Symbol/Variable.cpp:250-258
@@ -233,1 +249,11 @@
+
+CompilerDecl
+Variable::GetDecl ()
+{
+    Type *type = GetType();
+    CompilerDecl decl = type->GetSymbolFile()->GetDeclForUID(GetID());
+    if (decl)
+        decl.GetTypeSystem()->DeclLinkToObject(decl.GetOpaqueDecl(), shared_from_this());
+    return decl;
+}
 
----------------
As long as calling DeclLinkToObject(...) more than once with the same args is ok, then this will be fine.


http://reviews.llvm.org/D12658





More information about the lldb-commits mailing list