[Lldb-commits] [lldb] r248004 - Reduce inclusion of clang headers.

Bruce Mitchener via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 18 10:02:48 PDT 2015


Author: brucem
Date: Fri Sep 18 12:02:48 2015
New Revision: 248004

URL: http://llvm.org/viewvc/llvm-project?rev=248004&view=rev
Log:
Reduce inclusion of clang headers.

Summary:
With the recent changes to separate clang from the core structures
of LLDB, many inclusions of clang headers can be removed.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12954

Modified:
    lldb/trunk/include/lldb/Core/Value.h
    lldb/trunk/include/lldb/Core/ValueObjectList.h
    lldb/trunk/include/lldb/Expression/ASTDumper.h
    lldb/trunk/include/lldb/Symbol/Function.h
    lldb/trunk/include/lldb/Symbol/TypeSystem.h
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/API/SBTypeEnumMember.cpp
    lldb/trunk/source/Core/Debugger.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/Expression/FunctionCaller.cpp
    lldb/trunk/source/Expression/UserExpression.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
    lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
    lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
    lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
    lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
    lldb/trunk/source/Symbol/CompilerType.cpp
    lldb/trunk/source/Symbol/TypeList.cpp

Modified: lldb/trunk/include/lldb/Core/Value.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Value.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Value.h (original)
+++ lldb/trunk/include/lldb/Core/Value.h Fri Sep 18 12:02:48 2015
@@ -17,7 +17,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
-#include "lldb/Core/ClangForward.h"
 #include "lldb/Core/DataBufferHeap.h"
 #include "lldb/Core/Error.h"
 #include "lldb/Core/Scalar.h"

Modified: lldb/trunk/include/lldb/Core/ValueObjectList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectList.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectList.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectList.h Fri Sep 18 12:02:48 2015
@@ -17,7 +17,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/lldb-private.h"
-#include "lldb/Core/ClangForward.h"
 #include "lldb/Core/UserID.h"
 #include "lldb/Target/ExecutionContextScope.h"
 

Modified: lldb/trunk/include/lldb/Expression/ASTDumper.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ASTDumper.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ASTDumper.h (original)
+++ lldb/trunk/include/lldb/Expression/ASTDumper.h Fri Sep 18 12:02:48 2015
@@ -11,7 +11,6 @@
 #define liblldb_ASTDumper_h_
 
 #include "clang/AST/DeclVisitor.h"
-#include "clang/AST/StmtVisitor.h"
 #include "clang/AST/TypeVisitor.h"
 
 #include "lldb/Core/Stream.h"

Modified: lldb/trunk/include/lldb/Symbol/Function.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Function.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Function.h (original)
+++ lldb/trunk/include/lldb/Symbol/Function.h Fri Sep 18 12:02:48 2015
@@ -10,7 +10,6 @@
 #ifndef liblldb_Function_h_
 #define liblldb_Function_h_
 
-#include "lldb/Core/ClangForward.h"
 #include "lldb/Core/AddressRange.h"
 #include "lldb/Symbol/Block.h"
 #include "lldb/Symbol/Declaration.h"

Modified: lldb/trunk/include/lldb/Symbol/TypeSystem.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeSystem.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/TypeSystem.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeSystem.h Fri Sep 18 12:02:48 2015
@@ -13,12 +13,9 @@
 #include <functional>
 #include <string>
 #include "lldb/lldb-private.h"
-#include "lldb/Core/ClangForward.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Expression/Expression.h"
 #include "lldb/Symbol/CompilerDeclContext.h"
-#include "clang/AST/CharUnits.h"
-#include "clang/AST/Type.h"
 #include "llvm/Support/Casting.h"
 
 class DWARFDIE;

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Fri Sep 18 12:02:48 2015
@@ -19,11 +19,9 @@
 #include "lldb/Symbol/TypeSystem.h"
 
 #include "llvm/ADT/APSInt.h"
-#include "clang/AST/Decl.h"
 
 using namespace lldb;
 using namespace lldb_private;
-using namespace clang;
 
 SBType::SBType() :
     m_opaque_sp()

Modified: lldb/trunk/source/API/SBTypeEnumMember.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTypeEnumMember.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTypeEnumMember.cpp (original)
+++ lldb/trunk/source/API/SBTypeEnumMember.cpp Fri Sep 18 12:02:48 2015
@@ -17,7 +17,6 @@
 
 using namespace lldb;
 using namespace lldb_private;
-using namespace clang;
 
 SBTypeEnumMember::SBTypeEnumMember() :
     m_opaque_sp()

Modified: lldb/trunk/source/Core/Debugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Debugger.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Core/Debugger.cpp (original)
+++ lldb/trunk/source/Core/Debugger.cpp Fri Sep 18 12:02:48 2015
@@ -11,8 +11,6 @@
 
 #include <map>
 
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/Type.h"
 #include "llvm/ADT/StringRef.h"
 
 #include "lldb/lldb-private.h"
@@ -41,7 +39,6 @@
 #include "lldb/Interpreter/OptionValueProperties.h"
 #include "lldb/Interpreter/OptionValueSInt64.h"
 #include "lldb/Interpreter/OptionValueString.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/Symbol.h"

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Fri Sep 18 12:02:48 2015
@@ -15,7 +15,6 @@
 // C++ Includes
 // Other libraries and framework includes
 #include "llvm/Support/raw_ostream.h"
-#include "clang/AST/Type.h"
 
 // Project includes
 #include "lldb/Core/DataBufferHeap.h"

Modified: lldb/trunk/source/Expression/FunctionCaller.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/FunctionCaller.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Expression/FunctionCaller.cpp (original)
+++ lldb/trunk/source/Expression/FunctionCaller.cpp Fri Sep 18 12:02:48 2015
@@ -11,15 +11,6 @@
 // C Includes
 // C++ Includes
 // Other libraries and framework includes
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/RecordLayout.h"
-#include "clang/CodeGen/CodeGenAction.h"
-#include "clang/CodeGen/ModuleBuilder.h"
-#include "clang/Frontend/CompilerInstance.h"
-#include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Triple.h"
-#include "llvm/ExecutionEngine/ExecutionEngine.h"
-#include "llvm/IR/Module.h"
 
 // Project includes
 #include "lldb/Core/DataExtractor.h"
@@ -29,11 +20,9 @@
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Core/ValueObjectList.h"
 #include "lldb/Expression/ASTStructExtractor.h"
-#include "lldb/Expression/ClangExpressionParser.h"
 #include "lldb/Expression/FunctionCaller.h"
 #include "lldb/Expression/IRExecutionUnit.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Target/ExecutionContext.h"
@@ -167,7 +156,6 @@ FunctionCaller::WriteFunctionArguments (
     }
         
     Error error;
-    using namespace clang;
     lldb::ExpressionResults return_value = lldb::eExpressionSetupError;
 
     Process *process = exe_ctx.GetProcessPtr();
@@ -240,8 +228,6 @@ FunctionCaller::WriteFunctionArguments (
 bool
 FunctionCaller::InsertFunction (ExecutionContext &exe_ctx, lldb::addr_t &args_addr_ref, Stream &errors)
 {
-    using namespace clang;
-    
     if (CompileFunction(errors) != 0)
         return false;
     if (!WriteFunctionWrapper(exe_ctx, errors))
@@ -344,7 +330,6 @@ FunctionCaller::ExecuteFunction(
         Stream &errors, 
         Value &results)
 {
-    using namespace clang;
     lldb::ExpressionResults return_value = lldb::eExpressionSetupError;
     
     // FunctionCaller::ExecuteFunction execution is always just to get the result.  Do make sure we ignore

Modified: lldb/trunk/source/Expression/UserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Expression/UserExpression.cpp (original)
+++ lldb/trunk/source/Expression/UserExpression.cpp Fri Sep 18 12:02:48 2015
@@ -23,9 +23,6 @@
 #include "lldb/Core/StreamString.h"
 #include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/ASTResultSynthesizer.h"
-#include "lldb/Expression/ClangExpressionDeclMap.h"
-#include "lldb/Expression/ClangExpressionParser.h"
-#include "lldb/Expression/ClangModulesDeclVendor.h"
 #include "lldb/Expression/ClangPersistentVariables.h"
 #include "lldb/Expression/ExpressionSourceCode.h"
 #include "lldb/Expression/IRExecutionUnit.h"
@@ -34,12 +31,10 @@
 #include "lldb/Expression/UserExpression.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Symbol/Block.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/Type.h"
-#include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
@@ -48,9 +43,6 @@
 #include "lldb/Target/ThreadPlan.h"
 #include "lldb/Target/ThreadPlanCallUserExpression.h"
 
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/DeclObjC.h"
-
 using namespace lldb_private;
 
 UserExpression::UserExpression (ExecutionContextScope &exe_scope,

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Sep 18 12:02:48 2015
@@ -10,20 +10,6 @@
 #include "SymbolFileDWARF.h"
 
 // Other libraries and framework includes
-#include "clang/AST/ASTConsumer.h"
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclGroup.h"
-#include "clang/AST/DeclObjC.h"
-#include "clang/AST/DeclTemplate.h"
-#include "clang/Basic/Builtins.h"
-#include "clang/Basic/IdentifierTable.h"
-#include "clang/Basic/LangOptions.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/Basic/TargetInfo.h"
-#include "clang/Basic/Specifiers.h"
-#include "clang/Sema/DeclSpec.h"
-
 #include "llvm/Support/Casting.h"
 
 #include "lldb/Core/ArchSpec.h"

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Fri Sep 18 12:02:48 2015
@@ -18,8 +18,6 @@
 #include <vector>
 
 // Other libraries and framework includes
-#include "clang/AST/CharUnits.h"
-#include "clang/AST/ExternalASTSource.h"
 #include "llvm/ADT/DenseMap.h"
 
 #include "lldb/lldb-private.h"

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h Fri Sep 18 12:02:48 2015
@@ -14,8 +14,6 @@
 #include <vector>
 #include <bitset>
 
-#include "clang/AST/CharUnits.h"
-
 #include "lldb/Core/RangeMap.h"
 #include "lldb/Symbol/SymbolFile.h"
 

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp Fri Sep 18 12:02:48 2015
@@ -14,9 +14,6 @@
 // Other libraries and framework includes
 // Project includes
 
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/DeclCXX.h"
-
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/Module.h"

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp Fri Sep 18 12:02:48 2015
@@ -14,9 +14,6 @@
 // Other libraries and framework includes
 // Project includes
 
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/DeclCXX.h"
-
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/Module.h"

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp Fri Sep 18 12:02:48 2015
@@ -13,9 +13,6 @@
 // C++ Includes
 // Other libraries and framework includes
 // Project includes
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/DeclCXX.h"
-
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/Module.h"

Modified: lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp (original)
+++ lldb/trunk/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp Fri Sep 18 12:02:48 2015
@@ -14,9 +14,6 @@
 // Other libraries and framework includes
 // Project includes
 
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/DeclCXX.h"
-
 #include "lldb/lldb-private.h"
 #include "lldb/Core/ConstString.h"
 #include "lldb/Core/Log.h"

Modified: lldb/trunk/source/Symbol/CompilerType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompilerType.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompilerType.cpp (original)
+++ lldb/trunk/source/Symbol/CompilerType.cpp Fri Sep 18 12:02:48 2015
@@ -20,7 +20,6 @@
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/ClangExternalASTSourceCommon.h"
 #include "lldb/Symbol/Type.h"
-#include "lldb/Symbol/VerifyDecl.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Process.h"
 

Modified: lldb/trunk/source/Symbol/TypeList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/TypeList.cpp?rev=248004&r1=248003&r2=248004&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/TypeList.cpp (original)
+++ lldb/trunk/source/Symbol/TypeList.cpp Fri Sep 18 12:02:48 2015
@@ -13,18 +13,6 @@
 #include <vector>
 
 // Other libraries and framework includes
-#include "clang/AST/ASTConsumer.h"
-#include "clang/AST/ASTContext.h"
-#include "clang/AST/Decl.h"
-#include "clang/AST/DeclCXX.h"
-#include "clang/AST/DeclGroup.h"
-
-#include "clang/Basic/Builtins.h"
-#include "clang/Basic/IdentifierTable.h"
-#include "clang/Basic/LangOptions.h"
-#include "clang/Basic/SourceManager.h"
-#include "clang/Basic/TargetInfo.h"
-
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Support/raw_ostream.h"
 
@@ -36,7 +24,6 @@
 
 using namespace lldb;
 using namespace lldb_private;
-using namespace clang;
 
 TypeList::TypeList() :
     m_types ()




More information about the lldb-commits mailing list