[Lldb-commits] [lldb] a4459fe - [lldb] Fix use of undefined type 'lldb_private::UtilityFunction'

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 23 11:48:19 PDT 2020


Author: Jonas Devlieghere
Date: 2020-10-23T11:48:11-07:00
New Revision: a4459feca415a757fa0ca3ab4731a17240931a81

URL: https://github.com/llvm/llvm-project/commit/a4459feca415a757fa0ca3ab4731a17240931a81
DIFF: https://github.com/llvm/llvm-project/commit/a4459feca415a757fa0ca3ab4731a17240931a81.diff

LOG: [lldb] Fix use of undefined type 'lldb_private::UtilityFunction'

We were returning the default constructed unique_pointer from
TypeSystem.h for which the compiler does not have a definition. Move the
implementation into the cpp file.

Added: 
    

Modified: 
    lldb/include/lldb/Symbol/TypeSystem.h
    lldb/source/Symbol/TypeSystem.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Symbol/TypeSystem.h b/lldb/include/lldb/Symbol/TypeSystem.h
index d55595522b2c9..b6bebedc503e2 100644
--- a/lldb/include/lldb/Symbol/TypeSystem.h
+++ b/lldb/include/lldb/Symbol/TypeSystem.h
@@ -466,9 +466,7 @@ class TypeSystem : public PluginInterface {
   }
 
   virtual std::unique_ptr<UtilityFunction>
-  CreateUtilityFunction(std::string text, std::string name) {
-    return {};
-  }
+  CreateUtilityFunction(std::string text, std::string name);
 
   virtual PersistentExpressionState *GetPersistentExpressionState() {
     return nullptr;

diff  --git a/lldb/source/Symbol/TypeSystem.cpp b/lldb/source/Symbol/TypeSystem.cpp
index 985065926fc47..2adf36fa82761 100644
--- a/lldb/source/Symbol/TypeSystem.cpp
+++ b/lldb/source/Symbol/TypeSystem.cpp
@@ -6,22 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-//
-//  TypeSystem.cpp
-//  lldb
-//
-//  Created by Ryan Brown on 3/29/15.
-//
-//
-
 #include "lldb/Symbol/TypeSystem.h"
-
-#include <set>
-
 #include "lldb/Core/PluginManager.h"
+#include "lldb/Expression/UtilityFunction.h"
 #include "lldb/Symbol/CompilerType.h"
 #include "lldb/Target/Language.h"
 
+#include <set>
+
 using namespace lldb_private;
 using namespace lldb;
 
@@ -179,6 +171,11 @@ TypeSystem::DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name,
   return std::vector<CompilerDecl>();
 }
 
+std::unique_ptr<UtilityFunction>
+TypeSystem::CreateUtilityFunction(std::string text, std::string name) {
+  return {};
+}
+
 #pragma mark TypeSystemMap
 
 TypeSystemMap::TypeSystemMap()


        


More information about the lldb-commits mailing list