Index: include/lldb/Expression/ASTResultSynthesizer.h =================================================================== --- include/lldb/Expression/ASTResultSynthesizer.h +++ include/lldb/Expression/ASTResultSynthesizer.h @@ -51,7 +51,7 @@ //---------------------------------------------------------------------- /// Destructor //---------------------------------------------------------------------- - ~ASTResultSynthesizer(); + ~ASTResultSynthesizer() override; //---------------------------------------------------------------------- /// Link this consumer with a particular AST context @@ -60,7 +60,7 @@ /// This AST context will be used for types and identifiers, and also /// forwarded to the passthrough consumer, if one exists. //---------------------------------------------------------------------- - void Initialize(clang::ASTContext &Context); + void Initialize(clang::ASTContext &Context) override; //---------------------------------------------------------------------- /// Examine a list of Decls to find the function $__lldb_expr and @@ -71,32 +71,32 @@ /// which need to be searched recursively. That job falls to /// TransformTopLevelDecl. //---------------------------------------------------------------------- - bool HandleTopLevelDecl(clang::DeclGroupRef D); + bool HandleTopLevelDecl(clang::DeclGroupRef D) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void HandleTranslationUnit(clang::ASTContext &Ctx); + void HandleTranslationUnit(clang::ASTContext &Ctx) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void HandleTagDeclDefinition(clang::TagDecl *D); + void HandleTagDeclDefinition(clang::TagDecl *D) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void CompleteTentativeDefinition(clang::VarDecl *D); + void CompleteTentativeDefinition(clang::VarDecl *D) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void HandleVTable(clang::CXXRecordDecl *RD); + void HandleVTable(clang::CXXRecordDecl *RD) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void PrintStats(); + void PrintStats() override; //---------------------------------------------------------------------- /// Set the Sema object to use when performing transforms, and pass it on @@ -105,12 +105,13 @@ /// The Sema to use. Because Sema isn't externally visible, this class /// casts it to an Action for actual use. //---------------------------------------------------------------------- - void InitializeSema(clang::Sema &S); + void InitializeSema(clang::Sema &S) override; //---------------------------------------------------------------------- /// Reset the Sema to NULL now that transformations are done //---------------------------------------------------------------------- - void ForgetSema(); + void ForgetSema() override; + private: //---------------------------------------------------------------------- /// Hunt the given Decl for FunctionDecls named $__lldb_expr, recursing @@ -179,6 +180,6 @@ clang::Sema *m_sema; ///< The Sema to use. }; -} +} // namespace lldb_private -#endif +#endif // liblldb_ASTResultSynthesizer_h_ Index: include/lldb/Expression/ASTStructExtractor.h =================================================================== --- include/lldb/Expression/ASTStructExtractor.h +++ include/lldb/Expression/ASTStructExtractor.h @@ -59,7 +59,7 @@ //---------------------------------------------------------------------- /// Destructor //---------------------------------------------------------------------- - virtual ~ASTStructExtractor(); + ~ASTStructExtractor() override; //---------------------------------------------------------------------- /// Link this consumer with a particular AST context @@ -68,7 +68,7 @@ /// This AST context will be used for types and identifiers, and also /// forwarded to the passthrough consumer, if one exists. //---------------------------------------------------------------------- - void Initialize(clang::ASTContext &Context); + void Initialize(clang::ASTContext &Context) override; //---------------------------------------------------------------------- /// Examine a list of Decls to find the function $__lldb_expr and @@ -79,32 +79,32 @@ /// which need to be searched recursively. That job falls to /// TransformTopLevelDecl. //---------------------------------------------------------------------- - bool HandleTopLevelDecl(clang::DeclGroupRef D); + bool HandleTopLevelDecl(clang::DeclGroupRef D) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void HandleTranslationUnit(clang::ASTContext &Ctx); + void HandleTranslationUnit(clang::ASTContext &Ctx) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void HandleTagDeclDefinition(clang::TagDecl *D); + void HandleTagDeclDefinition(clang::TagDecl *D) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void CompleteTentativeDefinition(clang::VarDecl *D); + void CompleteTentativeDefinition(clang::VarDecl *D) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void HandleVTable(clang::CXXRecordDecl *RD); + void HandleVTable(clang::CXXRecordDecl *RD) override; //---------------------------------------------------------------------- /// Passthrough stub //---------------------------------------------------------------------- - void PrintStats(); + void PrintStats() override; //---------------------------------------------------------------------- /// Set the Sema object to use when performing transforms, and pass it on @@ -113,12 +113,13 @@ /// The Sema to use. Because Sema isn't externally visible, this class /// casts it to an Action for actual use. //---------------------------------------------------------------------- - void InitializeSema(clang::Sema &S); + void InitializeSema(clang::Sema &S) override; //---------------------------------------------------------------------- /// Reset the Sema to NULL now that transformations are done //---------------------------------------------------------------------- - void ForgetSema(); + void ForgetSema() override; + private: //---------------------------------------------------------------------- /// Hunt the given FunctionDecl for the argument struct and place @@ -151,6 +152,6 @@ std::string m_struct_name; ///< The name of the structure to extract. }; -} +} // namespace lldb_private -#endif +#endif // liblldb_ASTStructExtractor_h_ Index: include/lldb/Expression/ClangASTSource.h =================================================================== --- include/lldb/Expression/ClangASTSource.h +++ include/lldb/Expression/ClangASTSource.h @@ -60,7 +60,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - ~ClangASTSource(); + ~ClangASTSource() override; //------------------------------------------------------------------ /// Interface stubs. @@ -520,6 +520,6 @@ void AddNamedDecl (clang::NamedDecl *decl); }; -} +} // namespace lldb_private -#endif +#endif // liblldb_ClangASTSource_h_ Index: include/lldb/Expression/ClangExpressionDeclMap.h =================================================================== --- include/lldb/Expression/ClangExpressionDeclMap.h +++ include/lldb/Expression/ClangExpressionDeclMap.h @@ -80,7 +80,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - ~ClangExpressionDeclMap (); + ~ClangExpressionDeclMap() override; //------------------------------------------------------------------ /// Enable the state needed for parsing and IR transformation. @@ -354,7 +354,7 @@ /// True on success; false otherwise. //------------------------------------------------------------------ void - FindExternalVisibleDecls (NameSearchContext &context); + FindExternalVisibleDecls(NameSearchContext &context) override; //------------------------------------------------------------------ /// Find all entities matching a given name in a given module/namespace, @@ -702,4 +702,4 @@ } // namespace lldb_private -#endif // liblldb_ClangExpressionDeclMap_h_ +#endif // liblldb_ClangExpressionDeclMap_h_ Index: include/lldb/Expression/ClangFunction.h =================================================================== --- include/lldb/Expression/ClangFunction.h +++ include/lldb/Expression/ClangFunction.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef lldb_ClangFunction_h_ -#define lldb_ClangFunction_h_ +#ifndef liblldb_ClangFunction_h_ +#define liblldb_ClangFunction_h_ // C Includes // C++ Includes @@ -122,8 +122,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - virtual - ~ClangFunction(); + ~ClangFunction() override; //------------------------------------------------------------------ /// Compile the wrapper function @@ -335,7 +334,7 @@ /// translation unit. //------------------------------------------------------------------ const char * - Text () + Text() override { return m_wrapper_function_text.c_str(); } @@ -346,7 +345,7 @@ /// function. //------------------------------------------------------------------ const char * - FunctionName () + FunctionName() override { return m_wrapper_function_name.c_str(); } @@ -356,7 +355,7 @@ /// values. May be NULL if everything should be self-contained. //------------------------------------------------------------------ ClangExpressionDeclMap * - DeclMap () + DeclMap() override { return NULL; } @@ -380,14 +379,14 @@ /// the ASTs to after transformation. //------------------------------------------------------------------ clang::ASTConsumer * - ASTTransformer (clang::ASTConsumer *passthrough); + ASTTransformer(clang::ASTConsumer *passthrough) override; //------------------------------------------------------------------ /// Return true if validation code should be inserted into the /// expression. //------------------------------------------------------------------ bool - NeedsValidation () + NeedsValidation() override { return false; } @@ -397,7 +396,7 @@ /// resolved. //------------------------------------------------------------------ bool - NeedsVariableResolution () + NeedsVariableResolution() override { return false; } @@ -448,4 +447,4 @@ } // Namespace lldb_private -#endif // lldb_ClangFunction_h_ +#endif // liblldb_ClangFunction_h_ Index: include/lldb/Expression/ClangModulesDeclVendor.h =================================================================== --- include/lldb/Expression/ClangModulesDeclVendor.h +++ include/lldb/Expression/ClangModulesDeclVendor.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef _liblldb_ClangModulesDeclVendor_ -#define _liblldb_ClangModulesDeclVendor_ +#ifndef liblldb_ClangModulesDeclVendor_h +#define liblldb_ClangModulesDeclVendor_h #include "lldb/Core/ArchSpec.h" #include "lldb/Core/ClangForward.h" @@ -29,8 +29,7 @@ //------------------------------------------------------------------ ClangModulesDeclVendor(); - virtual - ~ClangModulesDeclVendor(); + ~ClangModulesDeclVendor() override; static ClangModulesDeclVendor * Create(Target &target); @@ -122,8 +121,8 @@ //------------------------------------------------------------------ static bool LanguageSupportsClangModules (lldb::LanguageType language); - }; -} -#endif /* defined(_lldb_ClangModulesDeclVendor_) */ +} // namespace lldb_private + +#endif // liblldb_ClangModulesDeclVendor_h Index: include/lldb/Expression/ClangUserExpression.h =================================================================== --- include/lldb/Expression/ClangUserExpression.h +++ include/lldb/Expression/ClangUserExpression.h @@ -74,8 +74,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - virtual - ~ClangUserExpression (); + ~ClangUserExpression() override; //------------------------------------------------------------------ /// Parse the expression @@ -183,7 +182,7 @@ /// translation unit. //------------------------------------------------------------------ const char * - Text () + Text() override { return m_transformed_text.c_str(); } @@ -203,7 +202,7 @@ /// function. //------------------------------------------------------------------ const char * - FunctionName () + FunctionName() override { return "$__lldb_expr"; } @@ -212,8 +211,8 @@ /// Return the language that should be used when parsing. To use /// the default, return eLanguageTypeUnknown. //------------------------------------------------------------------ - virtual lldb::LanguageType - Language () + lldb::LanguageType + Language() override { return m_language; } @@ -223,7 +222,7 @@ /// values. May be NULL if everything should be self-contained. //------------------------------------------------------------------ ClangExpressionDeclMap * - DeclMap () + DeclMap() override { return m_expr_decl_map.get(); } @@ -237,14 +236,14 @@ /// the ASTs to after transformation. //------------------------------------------------------------------ clang::ASTConsumer * - ASTTransformer (clang::ASTConsumer *passthrough); + ASTTransformer(clang::ASTConsumer *passthrough) override; //------------------------------------------------------------------ /// Return the desired result type of the function, or /// eResultTypeAny if indifferent. //------------------------------------------------------------------ - virtual ResultType - DesiredResultType () + ResultType + DesiredResultType() override { return m_desired_type; } @@ -254,7 +253,7 @@ /// expression. //------------------------------------------------------------------ bool - NeedsValidation () + NeedsValidation() override { return true; } @@ -264,7 +263,7 @@ /// resolved. //------------------------------------------------------------------ bool - NeedsVariableResolution () + NeedsVariableResolution() override { return true; } @@ -362,4 +361,4 @@ } // namespace lldb_private -#endif // liblldb_ClangUserExpression_h_ +#endif // liblldb_ClangUserExpression_h_ Index: include/lldb/Expression/ClangUtilityFunction.h =================================================================== --- include/lldb/Expression/ClangUtilityFunction.h +++ include/lldb/Expression/ClangUtilityFunction.h @@ -51,8 +51,7 @@ ClangUtilityFunction (const char *text, const char *name); - virtual - ~ClangUtilityFunction (); + ~ClangUtilityFunction() override; //------------------------------------------------------------------ /// Install the utility function into a process @@ -96,7 +95,7 @@ /// translation unit. //------------------------------------------------------------------ const char * - Text () + Text() override { return m_function_text.c_str(); } @@ -107,7 +106,7 @@ /// function. //------------------------------------------------------------------ const char * - FunctionName () + FunctionName() override { return m_function_name.c_str(); } @@ -117,7 +116,7 @@ /// values. May be NULL if everything should be self-contained. //------------------------------------------------------------------ ClangExpressionDeclMap * - DeclMap () + DeclMap() override { return m_expr_decl_map.get(); } @@ -141,7 +140,7 @@ /// the ASTs to after transformation. //------------------------------------------------------------------ clang::ASTConsumer * - ASTTransformer (clang::ASTConsumer *passthrough) + ASTTransformer(clang::ASTConsumer *passthrough) override { return NULL; } @@ -151,7 +150,7 @@ /// expression. //------------------------------------------------------------------ bool - NeedsValidation () + NeedsValidation() override { return false; } @@ -161,7 +160,7 @@ /// resolved. //------------------------------------------------------------------ bool - NeedsVariableResolution () + NeedsVariableResolution() override { return false; } @@ -176,4 +175,4 @@ } // namespace lldb_private -#endif // liblldb_ClangUtilityFunction_h_ +#endif // liblldb_ClangUtilityFunction_h_ Index: include/lldb/Expression/IRDynamicChecks.h =================================================================== --- include/lldb/Expression/IRDynamicChecks.h +++ include/lldb/Expression/IRDynamicChecks.h @@ -24,7 +24,7 @@ class Value; } -namespace lldb_private +namespace lldb_private { class ClangExpressionDeclMap; @@ -114,7 +114,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - virtual ~IRDynamicChecks(); + ~IRDynamicChecks() override; //------------------------------------------------------------------ /// Run this IR transformer on a single module @@ -127,18 +127,19 @@ /// @return /// True on success; false otherwise //------------------------------------------------------------------ - bool runOnModule(llvm::Module &M); + bool runOnModule(llvm::Module &M) override; //------------------------------------------------------------------ /// Interface stub //------------------------------------------------------------------ void assignPassManager(llvm::PMStack &PMS, - llvm::PassManagerType T = llvm::PMT_ModulePassManager); + llvm::PassManagerType T = llvm::PMT_ModulePassManager) override; //------------------------------------------------------------------ /// Returns PMT_ModulePassManager //------------------------------------------------------------------ - llvm::PassManagerType getPotentialPassManagerType() const; + llvm::PassManagerType getPotentialPassManagerType() const override; + private: //------------------------------------------------------------------ /// A basic block-level pass to find all pointer dereferences and @@ -164,6 +165,6 @@ DynamicCheckerFunctions &m_checker_functions; ///< The checker functions for the process }; -} +} // namespace lldb_private -#endif +#endif // liblldb_IRDynamicChecks_h_ Index: include/lldb/Expression/IRExecutionUnit.h =================================================================== --- include/lldb/Expression/IRExecutionUnit.h +++ include/lldb/Expression/IRExecutionUnit.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef lldb_IRExecutionUnit_h_ -#define lldb_IRExecutionUnit_h_ +#ifndef liblldb_IRExecutionUnit_h_ +#define liblldb_IRExecutionUnit_h_ // C Includes // C++ Includes @@ -79,7 +79,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - ~IRExecutionUnit(); + ~IRExecutionUnit() override; llvm::Module * GetModule() @@ -118,22 +118,22 @@ //------------------------------------------------------------------ /// ObjectFileJITDelegate overrides //------------------------------------------------------------------ - virtual lldb::ByteOrder - GetByteOrder () const; + lldb::ByteOrder + GetByteOrder() const override; - virtual uint32_t - GetAddressByteSize () const; + uint32_t + GetAddressByteSize() const override; - virtual void - PopulateSymtab (lldb_private::ObjectFile *obj_file, - lldb_private::Symtab &symtab); + void + PopulateSymtab(lldb_private::ObjectFile *obj_file, + lldb_private::Symtab &symtab) override; - virtual void - PopulateSectionList (lldb_private::ObjectFile *obj_file, - lldb_private::SectionList §ion_list); + void + PopulateSectionList(lldb_private::ObjectFile *obj_file, + lldb_private::SectionList §ion_list) override; - virtual bool - GetArchitecture (lldb_private::ArchSpec &arch); + bool + GetArchitecture(lldb_private::ArchSpec &arch) override; lldb::ModuleSP GetJITModule (); @@ -215,7 +215,7 @@ public: MemoryManager (IRExecutionUnit &parent); - virtual ~MemoryManager(); + ~MemoryManager() override; //------------------------------------------------------------------ /// Allocate space for executable code, and add it to the @@ -233,9 +233,9 @@ /// @return /// Allocated space. //------------------------------------------------------------------ - virtual uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, - llvm::StringRef SectionName); + uint8_t *allocateCodeSection(uintptr_t Size, unsigned Alignment, + unsigned SectionID, + llvm::StringRef SectionName) override; //------------------------------------------------------------------ /// Allocate space for data, and add it to the m_spaceBlocks map @@ -255,10 +255,10 @@ /// @return /// Allocated space. //------------------------------------------------------------------ - virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID, - llvm::StringRef SectionName, - bool IsReadOnly); + uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, + unsigned SectionID, + llvm::StringRef SectionName, + bool IsReadOnly) override; //------------------------------------------------------------------ /// Called when object loading is complete and section page @@ -270,7 +270,7 @@ /// @return /// True in case of failure, false in case of success. //------------------------------------------------------------------ - virtual bool finalizeMemory(std::string *ErrMsg) { + bool finalizeMemory(std::string *ErrMsg) override { // TODO: Ensure that the instruction cache is flushed because // relocations are updated by dy-load. See: // sys::Memory::InvalidateInstructionCache @@ -278,17 +278,17 @@ return false; } - virtual void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) { - return; + void registerEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size) override { } //------------------------------------------------------------------ /// Passthrough interface stub //------------------------------------------------------------------ - virtual uint64_t getSymbolAddress(const std::string &Name); + uint64_t getSymbolAddress(const std::string &Name) override; - virtual void *getPointerToNamedFunction(const std::string &Name, - bool AbortOnFailure = true); + void *getPointerToNamedFunction(const std::string &Name, + bool AbortOnFailure = true) override; + private: std::unique_ptr m_default_mm_ap; ///< The memory allocator to use in actually creating space. All calls are passed through to it. IRExecutionUnit &m_parent; ///< The execution unit this is a proxy for. @@ -403,4 +403,4 @@ } // namespace lldb_private -#endif // lldb_IRExecutionUnit_h_ +#endif // liblldb_IRExecutionUnit_h_ Index: include/lldb/Expression/IRForTarget.h =================================================================== --- include/lldb/Expression/IRForTarget.h +++ include/lldb/Expression/IRForTarget.h @@ -107,7 +107,7 @@ //------------------------------------------------------------------ /// Destructor //------------------------------------------------------------------ - virtual ~IRForTarget(); + ~IRForTarget() override; //------------------------------------------------------------------ /// Run this IR transformer on a single module @@ -126,8 +126,8 @@ /// @return /// True on success; false otherwise //------------------------------------------------------------------ - virtual bool - runOnModule (llvm::Module &llvm_module); + bool + runOnModule(llvm::Module &llvm_module) override; //------------------------------------------------------------------ /// Interface stub @@ -135,9 +135,9 @@ /// Implementation of the llvm::ModulePass::assignPassManager() /// function. //------------------------------------------------------------------ - virtual void - assignPassManager (llvm::PMStack &pass_mgr_stack, - llvm::PassManagerType pass_mgr_type = llvm::PMT_ModulePassManager); + void + assignPassManager(llvm::PMStack &pass_mgr_stack, + llvm::PassManagerType pass_mgr_type = llvm::PMT_ModulePassManager) override; //------------------------------------------------------------------ /// Returns PMT_ModulePassManager @@ -145,8 +145,8 @@ /// Implementation of the llvm::ModulePass::getPotentialPassManagerType() /// function. //------------------------------------------------------------------ - virtual llvm::PassManagerType - getPotentialPassManagerType() const; + llvm::PassManagerType + getPotentialPassManagerType() const override; private: //------------------------------------------------------------------ @@ -742,4 +742,4 @@ }; -#endif +#endif // liblldb_IRForTarget_h_ Index: include/lldb/Initialization/SystemInitializerCommon.h =================================================================== --- include/lldb/Initialization/SystemInitializerCommon.h +++ include/lldb/Initialization/SystemInitializerCommon.h @@ -28,11 +28,12 @@ { public: SystemInitializerCommon(); - virtual ~SystemInitializerCommon(); + ~SystemInitializerCommon() override; void Initialize() override; void Terminate() override; }; -} -#endif +} // namespace lldb_private + +#endif // LLDB_INITIALIZATION_SYSTEM_INITIALIZER_COMMON_H