llvm-project/lldb/source/Commands
Greg Clayton 56939cb310 TypeSystem is now a plugin interface and removed any "ClangASTContext &Class::GetClangASTContext()" functions.
This cleans up type systems to be more pluggable. Prior to this we had issues:
- Module, SymbolFile, and many others has "ClangASTContext &GetClangASTContext()" functions. All have been switched over to use "TypeSystem *GetTypeSystemForLanguage()"
- Cleaned up any places that were using the GetClangASTContext() functions to use TypeSystem
- Cleaned up Module so that it no longer has dedicated type system member variables:
    lldb::ClangASTContextUP     m_ast;          ///< The Clang AST context for this module.
    lldb::GoASTContextUP        m_go_ast;       ///< The Go AST context for this module.
    
    Now we have a type system map:
    
    typedef std::map<lldb::LanguageType, lldb::TypeSystemSP> TypeSystemMap;
    TypeSystemMap               m_type_system_map;    ///< A map of any type systems associated with this module
- Many places in code were using ClangASTContext static functions to place with CompilerType objects and add modifiers (const, volatile, restrict) and to make typedefs, L and R value references and more. These have been made into CompilerType functions that are abstract:

    class CompilerType
    {
    ...
    
    //----------------------------------------------------------------------
    // Return a new CompilerType that is a L value reference to this type if
    // this type is valid and the type system supports L value references,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    GetLValueReferenceType () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType that is a R value reference to this type if
    // this type is valid and the type system supports R value references,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    GetRValueReferenceType () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType adds a const modifier to this type if
    // this type is valid and the type system supports const modifiers,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    AddConstModifier () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType adds a volatile modifier to this type if
    // this type is valid and the type system supports volatile modifiers,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    AddVolatileModifier () const;

    //----------------------------------------------------------------------
    // Return a new CompilerType adds a restrict modifier to this type if
    // this type is valid and the type system supports restrict modifiers,
    // else return an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    AddRestrictModifier () const;

    //----------------------------------------------------------------------
    // Create a typedef to this type using "name" as the name of the typedef
    // this type is valid and the type system supports typedefs, else return
    // an invalid type.
    //----------------------------------------------------------------------
    CompilerType
    CreateTypedef (const char *name, const CompilerDeclContext &decl_ctx) const;
    
    };
    
Other changes include:
- Removed "CompilerType TypeSystem::GetIntTypeFromBitSize(...)" and CompilerType TypeSystem::GetFloatTypeFromBitSize(...) and replaced it with "CompilerType TypeSystem::GetBuiltinTypeForEncodingAndBitSize(lldb::Encoding encoding, size_t bit_size);"
- Fixed code in Type.h to not request the full type for a type for no good reason, just request the forward type and let the type expand as needed

llvm-svn: 247953
2015-09-17 22:23:34 +00:00
..
CMakeLists.txt [cmake] Remove LLVM_NO_RTTI. 2015-09-03 08:46:55 +00:00
CommandCompletions.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectApropos.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectApropos.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectArgs.cpp TypeSystem is now a plugin interface and removed any "ClangASTContext &Class::GetClangASTContext()" functions. 2015-09-17 22:23:34 +00:00
CommandObjectArgs.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectBreakpoint.cpp Move things from the LanguageRuntime that obviously belong in the new Language plugin instead. 2015-09-02 01:06:46 +00:00
CommandObjectBreakpoint.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectBreakpointCommand.cpp Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. 2015-07-14 05:48:36 +00:00
CommandObjectBreakpointCommand.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectBugreport.cpp Add new bugreport command to lldb 2015-07-02 10:03:37 +00:00
CommandObjectBugreport.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectCommands.cpp Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. 2015-07-14 05:48:36 +00:00
CommandObjectCommands.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectDisassemble.cpp Change the (internal to this file only) enum names from gcc_ to 2015-09-04 03:40:29 +00:00
CommandObjectDisassemble.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectExpression.cpp This patch makes Clang-independent base classes for all the expression types that lldb currently vends. 2015-09-15 21:13:50 +00:00
CommandObjectExpression.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectFrame.cpp ClangASTType is now CompilerType. 2015-08-11 22:53:00 +00:00
CommandObjectFrame.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectGUI.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectGUI.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectHelp.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectHelp.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectLanguage.cpp Remove the list of all languages in the help for "help language" since 2015-09-03 01:13:26 +00:00
CommandObjectLanguage.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectLog.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectLog.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectMemory.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
CommandObjectMemory.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectMultiword.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectPlatform.cpp Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. 2015-07-14 05:48:36 +00:00
CommandObjectPlatform.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectPlugin.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectPlugin.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectProcess.cpp Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. 2015-07-14 05:48:36 +00:00
CommandObjectProcess.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectQuit.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectQuit.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectRegister.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectRegister.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectSettings.cpp Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. 2015-07-14 05:48:36 +00:00
CommandObjectSettings.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectSource.cpp Resubmitting 240466 after fixing the linux test suite failures. 2015-06-25 21:46:34 +00:00
CommandObjectSource.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectSyntax.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectSyntax.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectTarget.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
CommandObjectTarget.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectThread.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectThread.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectType.cpp Add the ability for formatter categories to be bound to one or more languages 2015-09-17 00:14:50 +00:00
CommandObjectType.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectVersion.cpp Don't #include "lldb-python.h" from anywhere. 2015-05-29 17:41:47 +00:00
CommandObjectVersion.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectWatchpoint.cpp Final bit of type system cleanup that abstracts declaration contexts into lldb_private::CompilerDeclContext and renames ClangType to CompilerType in many accessors and functions. 2015-08-24 23:46:31 +00:00
CommandObjectWatchpoint.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
CommandObjectWatchpointCommand.cpp Fixed line wrapping for the "long help" content in LLDB commands. Content is now dynamically wrapped for the column width of the current terminal. Lines that begin with whitespace will be indented identically on subsequent lines to maintain formatting. 2015-07-14 05:48:36 +00:00
CommandObjectWatchpointCommand.h Fix Clang-tidy misc-use-override warnings in source/Commands headers, unify closing inclusion guards 2015-09-02 09:33:09 +00:00
Makefile Fix a few more clang (3.2) warnings on Linux: 2012-12-07 22:21:08 +00:00