[Lldb-commits] [PATCH] D25726: Improve the libstdc++ smart pointer formatters
Eugene.Zelenko added a comment. Please run Clang-format over new code. Comment at: source/Plugins/Language/CPlusPlus/LibStdcppSmartPointer.cpp:12 + +#include +#include STL headers should be after application's headers. Comment at: source/Plugins/Language/CPlusPlus/LibStdcppSmartPointer.cpp:28 +class LibStdcppSharedPtrSyntheticFrontEnd : public SyntheticChildrenFrontEnd { + public: + explicit LibStdcppSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp); No space before access specifiers. Same below. https://reviews.llvm.org/D25726 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25734: Add data formatter for libstdc++ unique_ptr
Eugene.Zelenko added a comment. There are same problems with formatting as in https://reviews.llvm.org/D25726. Also test case main() has wrong indentation. https://reviews.llvm.org/D25734 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25733: Add data formatter for libstdc++ tuple
Eugene.Zelenko added a comment. There are same problems with formatting as in https://reviews.llvm.org/D25726. Also test case main() has wrong indentation. https://reviews.llvm.org/D25733 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25734: Add data formatter for libstdc++ unique_ptr
Eugene.Zelenko added a comment. Headers orders is still not correct. https://reviews.llvm.org/D25734 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D25733: Add data formatter for libstdc++ tuple
Eugene.Zelenko added a comment. Headers orders is still not correct. Repository: rL LLVM https://reviews.llvm.org/D25733 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D26171: [LLDB] Fix RHEL 6 build and some Include What You Use warnings
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: labath, zturner. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Build problem happens because of errno. Repository: rL LLVM https://reviews.llvm.org/D26171 Files: lldb-svn.src/source/Host/posix/MainLoopPosix.cpp Index: lldb-svn.src/source/Host/posix/MainLoopPosix.cpp === --- lldb-svn.src/source/Host/posix/MainLoopPosix.cpp +++ lldb-svn.src/source/Host/posix/MainLoopPosix.cpp @@ -8,11 +8,14 @@ //===--===// #include "lldb/Host/posix/MainLoopPosix.h" - +#include "lldb/Core/Error.h" +#include +#include +#include +#include #include +#include -#include "lldb/Core/Error.h" - using namespace lldb; using namespace lldb_private; Index: lldb-svn.src/source/Host/posix/MainLoopPosix.cpp === --- lldb-svn.src/source/Host/posix/MainLoopPosix.cpp +++ lldb-svn.src/source/Host/posix/MainLoopPosix.cpp @@ -8,11 +8,14 @@ //===--===// #include "lldb/Host/posix/MainLoopPosix.h" - +#include "lldb/Core/Error.h" +#include +#include +#include +#include #include +#include -#include "lldb/Core/Error.h" - using namespace lldb; using namespace lldb_private; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r285710 - Fix RHEL 6 build with missing cerrno and some other Include What You Use warnings.
Author: eugenezelenko Date: Tue Nov 1 12:11:10 2016 New Revision: 285710 URL: http://llvm.org/viewvc/llvm-project?rev=285710&view=rev Log: Fix RHEL 6 build with missing cerrno and some other Include What You Use warnings. Differential revision: https://reviews.llvm.org/D26171 Modified: lldb/trunk/source/Host/posix/MainLoopPosix.cpp Modified: lldb/trunk/source/Host/posix/MainLoopPosix.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/MainLoopPosix.cpp?rev=285710&r1=285709&r2=285710&view=diff == --- lldb/trunk/source/Host/posix/MainLoopPosix.cpp (original) +++ lldb/trunk/source/Host/posix/MainLoopPosix.cpp Tue Nov 1 12:11:10 2016 @@ -8,10 +8,13 @@ //===--===// #include "lldb/Host/posix/MainLoopPosix.h" - -#include - #include "lldb/Core/Error.h" +#include +#include +#include +#include +#include +#include using namespace lldb; using namespace lldb_private; ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13574: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. This is second attempt based on current code. I checked this patch on my own build on RHEL 6. Please check it in if it's OK, because I don't have SVN write access. Repository: rL LLVM http://reviews.llvm.org/D13574 Files: include/lldb/Core/Communication.h include/lldb/Core/Debugger.h include/lldb/Core/Disassembler.h include/lldb/Core/EmulateInstruction.h include/lldb/Core/IOHandler.h include/lldb/Core/Log.h include/lldb/Core/Module.h include/lldb/Core/SearchFilter.h include/lldb/Core/StreamGDBRemote.h include/lldb/Core/ValueObjectChild.h include/lldb/Core/ValueObjectConstResult.h include/lldb/Core/ValueObjectDynamicValue.h include/lldb/Core/ValueObjectMemory.h include/lldb/Core/ValueObjectRegister.h Index: include/lldb/Core/ValueObjectDynamicValue.h === --- include/lldb/Core/ValueObjectDynamicValue.h +++ include/lldb/Core/ValueObjectDynamicValue.h @@ -26,44 +26,43 @@ class ValueObjectDynamicValue : public ValueObject { public: -virtual -~ValueObjectDynamicValue(); +~ValueObjectDynamicValue() override; -virtual uint64_t -GetByteSize(); +uint64_t +GetByteSize() override; -virtual ConstString -GetTypeName(); +ConstString +GetTypeName() override; -virtual ConstString -GetQualifiedTypeName(); +ConstString +GetQualifiedTypeName() override; -virtual ConstString -GetDisplayTypeName(); +ConstString +GetDisplayTypeName() override; -virtual size_t -CalculateNumChildren(); +size_t +CalculateNumChildren() override; -virtual lldb::ValueType -GetValueType() const; +lldb::ValueType +GetValueType() const override; -virtual bool -IsInScope (); +bool +IsInScope() override; -virtual bool -IsDynamic () +bool +IsDynamic() override { return true; } -virtual bool -GetIsConstant () const +bool +GetIsConstant() const override { return false; } -virtual ValueObject * -GetParent() +ValueObject * +GetParent() override { if (m_parent) return m_parent->GetParent(); @@ -71,8 +70,8 @@ return NULL; } -virtual const ValueObject * -GetParent() const +const ValueObject * +GetParent() const override { if (m_parent) return m_parent->GetParent(); @@ -80,8 +79,8 @@ return NULL; } -virtual lldb::ValueObjectSP -GetStaticValue () +lldb::ValueObjectSP +GetStaticValue() override { return m_parent->GetSP(); } @@ -96,48 +95,48 @@ m_owning_valobj_sp = owning_sp; } -virtual bool -SetValueFromCString (const char *value_str, Error& error); +bool +SetValueFromCString(const char *value_str, Error& error) override; -virtual bool -SetData (DataExtractor &data, Error &error); +bool +SetData(DataExtractor &data, Error &error) override; -virtual TypeImpl -GetTypeImpl (); +TypeImpl +GetTypeImpl() override; -virtual lldb::LanguageType -GetPreferredDisplayLanguage (); +lldb::LanguageType +GetPreferredDisplayLanguage() override; void SetPreferredDisplayLanguage (lldb::LanguageType); -virtual bool -GetDeclaration (Declaration &decl); +bool +GetDeclaration(Declaration &decl) override; protected: -virtual bool -UpdateValue (); +bool +UpdateValue() override; -virtual LazyBool -CanUpdateWithInvalidExecutionContext () +LazyBool +CanUpdateWithInvalidExecutionContext() override { return eLazyBoolYes; } -virtual lldb::DynamicValueType -GetDynamicValueTypeImpl () +lldb::DynamicValueType +GetDynamicValueTypeImpl() override { return m_use_dynamic; } -virtual bool -HasDynamicValueTypeInfo () +bool +HasDynamicValueTypeInfo() override { return true; } -virtual CompilerType -GetCompilerTypeImpl (); +CompilerType +GetCompilerTypeImpl() override; Address m_address; ///< The variable that this value object is based upon TypeAndOrName m_dynamic_type_info; // We can have a type_sp or just a name @@ -158,4 +157,4 @@ } // namespace lldb_private -#endif // liblldb_ValueObjectDynamicValue_h_ +#endif // liblldb_ValueObjectDynamicValue_h_ Index: include/lldb/Core/ValueObjectMemory.h === --- include/lldb/Core/ValueObjectMemory.h +++ include/lldb/Core/ValueObjectMemory.h @@ -26,6 +26,8 @@ class ValueObjectMemory : public Val
Re: [Lldb-commits] [PATCH] D13574: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Core; other minor fixes.
Eugene.Zelenko added a comment. I make whitespaces more consistent. Space between function names and round bracket is consistent with Clang-format settings for LLDB. Repository: rL LLVM http://reviews.llvm.org/D13574 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13602: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. This is second attempt based on current code. I checked this patch on my own build on RHEL 6. Please check it in if it's OK, because I don't have SVN write access. Repository: rL LLVM http://reviews.llvm.org/D13602 Files: include/lldb/Host/MonitoringProcessLauncher.h include/lldb/Host/posix/HostProcessPosix.h include/lldb/Interpreter/CommandCompletions.h include/lldb/Interpreter/CommandInterpreter.h include/lldb/Interpreter/CommandObject.h include/lldb/Interpreter/CommandObjectMultiword.h include/lldb/Interpreter/CommandObjectRegexCommand.h include/lldb/Interpreter/CommandOptionValidators.h include/lldb/Interpreter/OptionGroupArchitecture.h include/lldb/Interpreter/OptionGroupBoolean.h include/lldb/Interpreter/OptionGroupFile.h include/lldb/Interpreter/OptionGroupFormat.h include/lldb/Interpreter/OptionGroupOutputFile.h include/lldb/Interpreter/OptionGroupPlatform.h include/lldb/Interpreter/OptionGroupString.h include/lldb/Interpreter/OptionGroupUInt64.h include/lldb/Interpreter/OptionGroupUUID.h include/lldb/Interpreter/OptionGroupValueObjectDisplay.h include/lldb/Interpreter/OptionGroupVariable.h include/lldb/Interpreter/OptionGroupWatchpoint.h include/lldb/Interpreter/Options.h include/lldb/Interpreter/ScriptInterpreter.h Index: include/lldb/Host/posix/HostProcessPosix.h === --- include/lldb/Host/posix/HostProcessPosix.h +++ include/lldb/Host/posix/HostProcessPosix.h @@ -24,7 +24,7 @@ public: HostProcessPosix(); HostProcessPosix(lldb::process_t process); -virtual ~HostProcessPosix(); +~HostProcessPosix() override; virtual Error Signal(int signo) const; static Error Signal(lldb::process_t process, int signo); @@ -37,6 +37,7 @@ HostThread StartMonitoring(HostProcess::MonitorCallback callback, void *callback_baton, bool monitor_signals) override; }; -} -#endif +} // namespace lldb_private + +#endif // lldb_Host_HostProcesPosix_h_ Index: include/lldb/Host/MonitoringProcessLauncher.h === --- include/lldb/Host/MonitoringProcessLauncher.h +++ include/lldb/Host/MonitoringProcessLauncher.h @@ -20,11 +20,12 @@ public: explicit MonitoringProcessLauncher(std::unique_ptr delegate_launcher); -virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error); +HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error) override; private: std::unique_ptr m_delegate_launcher; }; -} -#endif +} // namespace lldb_private + +#endif // lldb_Host_MonitoringProcessLauncher_h_ Index: include/lldb/Interpreter/ScriptInterpreter.h === --- include/lldb/Interpreter/ScriptInterpreter.h +++ include/lldb/Interpreter/ScriptInterpreter.h @@ -10,6 +10,10 @@ #ifndef liblldb_ScriptInterpreter_h_ #define liblldb_ScriptInterpreter_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/lldb-private.h" #include "lldb/Core/Broadcaster.h" @@ -19,20 +23,16 @@ #include "lldb/Utility/PseudoTerminal.h" - namespace lldb_private { class ScriptInterpreterLocker { public: -ScriptInterpreterLocker () -{ -} +ScriptInterpreterLocker() = default; -virtual ~ScriptInterpreterLocker () -{ -} +virtual ~ScriptInterpreterLocker() = default; + private: DISALLOW_COPY_AND_ASSIGN (ScriptInterpreterLocker); }; @@ -40,7 +40,6 @@ class ScriptInterpreter : public PluginInterface { public: - typedef enum { eScriptReturnTypeCharPtr, @@ -62,7 +61,7 @@ ScriptInterpreter (CommandInterpreter &interpreter, lldb::ScriptLanguage script_lang); -virtual ~ScriptInterpreter (); +~ScriptInterpreter() override; struct ExecuteScriptOptions { @@ -324,7 +323,6 @@ SetBreakpointCommandCallbackFunction (BreakpointOptions *bp_options, const char *function_name) { -return; } /// Set a one-liner as the callback for the watchpoint. @@ -332,7 +330,6 @@ SetWatchpointCommandCallback (WatchpointOptions *wp_options, const char *oneliner) { -return; } virtual bool @@ -459,7 +456,7 @@ virtual bool GetDocumentationForItem (const char* item, std::string& dest) { - dest.clear(); +dest.clear(); return false; } @@ -514,8 +511,8 @@ int GetMasterFileDescriptor (); - CommandInterpreter & - GetCommandInterpreter (); +CommandInterpreter & +GetCommandInterpreter(); static s
[Lldb-commits] [PATCH] D13681: [LLDB] Fix Clang-tidy misc-use-override warnings in remaining files in include; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. This is second attempt based on current code. I checked this patch on my own build on RHEL 6. Please check it in if it's OK, because I don't have SVN write access. Repository: rL LLVM http://reviews.llvm.org/D13681 Files: Core/ValueObjectSyntheticFilter.h Core/ValueObjectVariable.h Symbol/ClangASTContext.h Symbol/GoASTContext.h Symbol/TypeSystem.h Target/ThreadPlanStepOverRange.h Target/ThreadPlanStepRange.h Target/ThreadPlanStepThrough.h Target/ThreadPlanStepUntil.h Target/ThreadPlanTracer.h Index: Target/ThreadPlanStepOverRange.h === --- Target/ThreadPlanStepOverRange.h +++ Target/ThreadPlanStepOverRange.h @@ -25,32 +25,28 @@ ThreadPlanShouldStopHere { public: - ThreadPlanStepOverRange (Thread &thread, const AddressRange &range, const SymbolContext &addr_context, lldb::RunMode stop_others, LazyBool step_out_avoids_no_debug); -virtual ~ThreadPlanStepOverRange (); +~ThreadPlanStepOverRange() override; -virtual void GetDescription (Stream *s, lldb::DescriptionLevel level); -virtual bool ShouldStop (Event *event_ptr); +void GetDescription(Stream *s, lldb::DescriptionLevel level) override; +bool ShouldStop(Event *event_ptr) override; protected: -virtual bool DoPlanExplainsStop (Event *event_ptr); -virtual bool DoWillResume (lldb::StateType resume_state, bool current_plan); +bool DoPlanExplainsStop(Event *event_ptr) override; +bool DoWillResume(lldb::StateType resume_state, bool current_plan) override; -virtual void -SetFlagsToDefault () +void +SetFlagsToDefault() override { GetFlags().Set(ThreadPlanStepOverRange::s_default_flag_values); } - - - -private: +private: static uint32_t s_default_flag_values; void SetupAvoidNoDebug(LazyBool step_out_avoids_code_without_debug_info); @@ -59,9 +55,8 @@ bool m_first_resume; DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepOverRange); - }; } // namespace lldb_private -#endif // liblldb_ThreadPlanStepOverRange_h_ +#endif // liblldb_ThreadPlanStepOverRange_h_ Index: Target/ThreadPlanStepRange.h === --- Target/ThreadPlanStepRange.h +++ Target/ThreadPlanStepRange.h @@ -33,24 +33,22 @@ lldb::RunMode stop_others, bool given_ranges_only = false); -virtual ~ThreadPlanStepRange (); +~ThreadPlanStepRange() override; -virtual void GetDescription (Stream *s, lldb::DescriptionLevel level) = 0; -virtual bool ValidatePlan (Stream *error); -virtual bool ShouldStop (Event *event_ptr) = 0; -virtual Vote ShouldReportStop (Event *event_ptr); -virtual bool StopOthers (); -virtual lldb::StateType GetPlanRunState (); -virtual bool WillStop (); -virtual bool MischiefManaged (); -virtual void DidPush (); -virtual bool IsPlanStale (); +void GetDescription(Stream *s, lldb::DescriptionLevel level) override = 0; +bool ValidatePlan(Stream *error) override; +bool ShouldStop(Event *event_ptr) override = 0; +Vote ShouldReportStop(Event *event_ptr) override; +bool StopOthers() override; +lldb::StateType GetPlanRunState() override; +bool WillStop() override; +bool MischiefManaged() override; +void DidPush() override; +bool IsPlanStale() override; - void AddRange(const AddressRange &new_range); protected: - bool InRange(); lldb::FrameComparison CompareCurrentFrameToStartFrame(); bool InSymbol(); @@ -88,10 +86,10 @@ private: std::vector m_instruction_ranges; -DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepRange); +DISALLOW_COPY_AND_ASSIGN (ThreadPlanStepRange); }; } // namespace lldb_private -#endif // liblldb_ThreadPlanStepRange_h_ +#endif // liblldb_ThreadPlanStepRange_h_ Index: Target/ThreadPlanStepUntil.h === --- Target/ThreadPlanStepUntil.h +++ Target/ThreadPlanStepUntil.h @@ -19,33 +19,32 @@ namespace lldb_private { - class ThreadPlanStepUntil : public ThreadPlan { public: -virtual ~ThreadPlanStepUntil (); +~ThreadPlanStepUntil() override; -virtual void GetDescription (Stream *s, lldb::DescriptionLevel level); -virtual bool ValidatePlan (Stream *error); -virtual bool ShouldStop (Event *event_ptr); -virtual bool StopOthers (); -virtual lldb::StateType GetPlanRunState (); -virtual bool WillStop (); -virtual bool MischiefManaged
[Lldb-commits] [PATCH] D13684: [LLDB] Fix Clang-tidy modernize-use-override warnings in source/Plugins/ABI; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Herald added a subscriber: dsanders. This is second attempt based on current code. I checked this patch on my own build on RHEL 6. Please check it in if it's OK, because I don't have SVN write access. Repository: rL LLVM http://reviews.llvm.org/D13684 Files: source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h source/Plugins/ABI/SysV-arm/ABISysV_arm.h source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h source/Plugins/ABI/SysV-i386/ABISysV_i386.h source/Plugins/ABI/SysV-mips/ABISysV_mips.h source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h Index: source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h === --- source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h +++ source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h @@ -21,46 +21,37 @@ public lldb_private::ABI { public: +~ABISysV_ppc64() override = default; -~ABISysV_ppc64() -{ -} +size_t +GetRedZoneSize() const override; -virtual size_t -GetRedZoneSize () const; - -virtual bool -PrepareTrivialCall (lldb_private::Thread &thread, -lldb::addr_t sp, -lldb::addr_t functionAddress, -lldb::addr_t returnAddress, -llvm::ArrayRef args) const; +bool +PrepareTrivialCall(lldb_private::Thread &thread, + lldb::addr_t sp, + lldb::addr_t functionAddress, + lldb::addr_t returnAddress, + llvm::ArrayRef args) const override; -virtual bool -GetArgumentValues (lldb_private::Thread &thread, - lldb_private::ValueList &values) const; +bool +GetArgumentValues(lldb_private::Thread &thread, + lldb_private::ValueList &values) const override; -virtual lldb_private::Error -SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value); +lldb_private::Error +SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value) override; -protected: lldb::ValueObjectSP -GetReturnValueObjectSimple (lldb_private::Thread &thread, -lldb_private::CompilerType &ast_type) const; - -public: -virtual lldb::ValueObjectSP -GetReturnValueObjectImpl (lldb_private::Thread &thread, - lldb_private::CompilerType &type) const; +GetReturnValueObjectImpl(lldb_private::Thread &thread, + lldb_private::CompilerType &type) const override; -virtual bool -CreateFunctionEntryUnwindPlan (lldb_private::UnwindPlan &unwind_plan); +bool +CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override; -virtual bool -CreateDefaultUnwindPlan (lldb_private::UnwindPlan &unwind_plan); +bool +CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override; -virtual bool -RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info); +bool +RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override; // The SysV ppc64 ABI requires that stack frames be 16 byte aligned. // When there is a trap handler on the stack, e.g. _sigtramp in userland @@ -72,8 +63,8 @@ // Whitelisting the trap handlers for user space would be easy (_sigtramp) but // in other environments there can be a large number of different functions // involved in async traps. -virtual bool -CallFrameAddressIsValid (lldb::addr_t cfa) +bool +CallFrameAddressIsValid(lldb::addr_t cfa) override { // Make sure the stack call frame addresses are 8 byte aligned if (cfa & (8ull - 1ull)) @@ -83,19 +74,21 @@ return true; } -virtual bool -CodeAddressIsValid (lldb::addr_t pc) +bool +CodeAddressIsValid(lldb::addr_t pc) override { // We have a 64 bit address space, so anything is valid as opcodes // aren't fixed width... return true; } -virtual const lldb_private::RegisterInfo * -GetRegisterInfoArray (uint32_t &count); +const lldb_private::RegisterInfo * +GetRegisterInfoArray(uint32_t &count) override; + //-- // Static Functions //-- + static void Initialize();
[Lldb-commits] [lldb] r250476 - Test commit. Part of:
Author: eugenezelenko Date: Thu Oct 15 19:17:35 2015 New Revision: 250476 URL: http://llvm.org/viewvc/llvm-project?rev=250476&view=rev Log: Test commit. Part of: [LLDB] Fix Clang-tidy misc-use-override warnings in remaining files in include; other minor fixes. Differential Revision: http://reviews.llvm.org/D13681. Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=250476&r1=250475&r2=250476&view=diff == --- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original) +++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Thu Oct 15 19:17:35 2015 @@ -216,7 +216,6 @@ public: return ClangASTContext::GetUnknownAnyType(getASTContext()); } - static clang::DeclContext * GetDeclContextForType (clang::QualType type); @@ -400,7 +399,6 @@ public: // Returns a mask containing bits from the ClangASTContext::eTypeXXX enumerations - //-- // Namespace Declarations //-- @@ -1006,9 +1004,7 @@ public: const char *name, int64_t enum_value, uint32_t enum_value_bit_size); - - - + CompilerType GetEnumerationIntegerType (lldb::opaque_compiler_type_t type); @@ -1021,7 +1017,6 @@ public: static CompilerType CreateMemberPointerType (const CompilerType& type, const CompilerType &pointee_type); - // Converts "s" to a floating point value and place resulting floating // point bytes in the "dst" buffer. size_t @@ -1029,6 +1024,7 @@ public: const char *s, uint8_t *dst, size_t dst_size) override; + //-- // Dumping types //-- @@ -1066,7 +1062,7 @@ public: lldb::offset_t data_offset, size_t data_byte_size) override; -virtual void +void DumpTypeDescription (lldb::opaque_compiler_type_t type) override; // Dump to stdout void @@ -1122,6 +1118,7 @@ public: clang::VarDecl * CreateVariableDeclaration (clang::DeclContext *decl_context, const char *name, clang::QualType type); + protected: static clang::QualType GetQualType (lldb::opaque_compiler_type_t type) @@ -1178,7 +1175,7 @@ class ClangASTContextForExpressions : pu public: ClangASTContextForExpressions (Target &target); -virtual ~ClangASTContextForExpressions () {} +~ClangASTContextForExpressions() override = default; UserExpression * GetUserExpression (const char *expr, ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r250485 - [LLDB] Fix Clang-tidy misc-use-override warnings in remaining files in include; other minor fixes.
Author: eugenezelenko Date: Thu Oct 15 20:11:37 2015 New Revision: 250485 URL: http://llvm.org/viewvc/llvm-project?rev=250485&view=rev Log: [LLDB] Fix Clang-tidy misc-use-override warnings in remaining files in include; other minor fixes. Differential Revision: http://reviews.llvm.org/D13681 Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h lldb/trunk/include/lldb/Core/ValueObjectVariable.h lldb/trunk/include/lldb/Symbol/GoASTContext.h lldb/trunk/include/lldb/Symbol/TypeSystem.h lldb/trunk/include/lldb/Target/ThreadPlanStepOverRange.h lldb/trunk/include/lldb/Target/ThreadPlanStepRange.h lldb/trunk/include/lldb/Target/ThreadPlanStepThrough.h lldb/trunk/include/lldb/Target/ThreadPlanStepUntil.h lldb/trunk/include/lldb/Target/ThreadPlanTracer.h Modified: lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h?rev=250485&r1=250484&r2=250485&view=diff == --- lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h (original) +++ lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Thu Oct 15 20:11:37 2015 @@ -13,6 +13,7 @@ // C Includes // C++ Includes #include + // Other libraries and framework includes // Project includes #include "lldb/Core/ThreadSafeSTLMap.h" @@ -30,61 +31,63 @@ namespace lldb_private { class ValueObjectSynthetic : public ValueObject { public: -virtual -~ValueObjectSynthetic(); +~ValueObjectSynthetic() override; -virtual uint64_t -GetByteSize(); +uint64_t +GetByteSize() override; -virtual ConstString -GetTypeName(); +ConstString +GetTypeName() override; -virtual ConstString -GetQualifiedTypeName(); +ConstString +GetQualifiedTypeName() override; -virtual ConstString -GetDisplayTypeName(); +ConstString +GetDisplayTypeName() override; -virtual bool -MightHaveChildren(); +bool +MightHaveChildren() override; -virtual size_t -CalculateNumChildren(); +size_t +CalculateNumChildren() override; -virtual lldb::ValueType -GetValueType() const; +lldb::ValueType +GetValueType() const override; -virtual lldb::ValueObjectSP -GetChildAtIndex (size_t idx, bool can_create); +lldb::ValueObjectSP +GetChildAtIndex(size_t idx, bool can_create) override; -virtual lldb::ValueObjectSP -GetChildMemberWithName (const ConstString &name, bool can_create); +lldb::ValueObjectSP +GetChildMemberWithName(const ConstString &name, bool can_create) override; -virtual size_t -GetIndexOfChildWithName (const ConstString &name); +size_t +GetIndexOfChildWithName(const ConstString &name) override; -virtual lldb::ValueObjectSP -GetDynamicValue (lldb::DynamicValueType valueType); +lldb::ValueObjectSP +GetDynamicValue(lldb::DynamicValueType valueType) override; -virtual bool -IsInScope (); +bool +IsInScope() override; -virtual bool -HasSyntheticValue() +bool +HasSyntheticValue() override { return false; } -virtual bool -IsSynthetic() { return true; } +bool +IsSynthetic() override +{ +return true; +} -virtual void -CalculateSyntheticValue (bool use_synthetic) +void +CalculateSyntheticValue(bool use_synthetic) override { } -virtual bool -IsDynamic () +bool +IsDynamic() override { if (m_parent) return m_parent->IsDynamic(); @@ -92,8 +95,8 @@ public: return false; } -virtual lldb::ValueObjectSP -GetStaticValue () +lldb::ValueObjectSP +GetStaticValue() override { if (m_parent) return m_parent->GetStaticValue(); @@ -110,8 +113,8 @@ public: return lldb::eNoDynamicValues; } -virtual ValueObject * -GetParent() +ValueObject * +GetParent() override { if (m_parent) return m_parent->GetParent(); @@ -119,8 +122,8 @@ public: return NULL; } -virtual const ValueObject * -GetParent() const +const ValueObject * +GetParent() const override { if (m_parent) return m_parent->GetParent(); @@ -128,51 +131,51 @@ public: return NULL; } -virtual lldb::ValueObjectSP -GetNonSyntheticValue (); +lldb::ValueObjectSP +GetNonSyntheticValue() override; -virtual bool -CanProvideValue (); +bool +CanProvideValue() override; -virtual bool -DoesProvideSyntheticValue () +bool +DoesProvideSyntheticValue() override { return (UpdateValueIfNeeded(), m_provides_value == eLazyBoolYes); } -virtual bool -GetIsConstant () con
[Lldb-commits] [lldb] r250538 - [LLDB] Fix Clang-tidy modernize-use-override warnings in source/Plugins/ABI; other minor fixes.
Author: eugenezelenko Date: Fri Oct 16 13:49:42 2015 New Revision: 250538 URL: http://llvm.org/viewvc/llvm-project?rev=250538&view=rev Log: [LLDB] Fix Clang-tidy modernize-use-override warnings in source/Plugins/ABI; other minor fixes. Differential Revision: http://reviews.llvm.org/D13684 Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h lldb/trunk/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.h lldb/trunk/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h lldb/trunk/source/Plugins/ABI/SysV-arm/ABISysV_arm.h lldb/trunk/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.h lldb/trunk/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.h lldb/trunk/source/Plugins/ABI/SysV-i386/ABISysV_i386.h lldb/trunk/source/Plugins/ABI/SysV-mips/ABISysV_mips.h lldb/trunk/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h lldb/trunk/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.h lldb/trunk/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.h lldb/trunk/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h Modified: lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h?rev=250538&r1=250537&r2=250538&view=diff == --- lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h (original) +++ lldb/trunk/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.h Fri Oct 16 13:49:42 2015 @@ -20,42 +20,36 @@ class ABIMacOSX_arm : public lldb_private::ABI { public: -~ABIMacOSX_arm() { } +~ABIMacOSX_arm() override = default; -virtual size_t -GetRedZoneSize () const; +size_t +GetRedZoneSize() const override; -virtual bool -PrepareTrivialCall (lldb_private::Thread &thread, -lldb::addr_t sp, -lldb::addr_t func_addr, -lldb::addr_t returnAddress, -llvm::ArrayRef args) const; - -virtual bool -GetArgumentValues (lldb_private::Thread &thread, - lldb_private::ValueList &values) const; +bool +PrepareTrivialCall(lldb_private::Thread &thread, + lldb::addr_t sp, + lldb::addr_t func_addr, + lldb::addr_t returnAddress, + llvm::ArrayRef args) const override; -virtual lldb_private::Error -SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value); - -protected: -virtual lldb::ValueObjectSP -GetReturnValueObjectImpl (lldb_private::Thread &thread, -lldb_private::CompilerType &ast_type) const; +bool +GetArgumentValues(lldb_private::Thread &thread, + lldb_private::ValueList &values) const override; + +lldb_private::Error +SetReturnValueObject(lldb::StackFrameSP &frame_sp, lldb::ValueObjectSP &new_value) override; -public: -virtual bool -CreateFunctionEntryUnwindPlan (lldb_private::UnwindPlan &unwind_plan); +bool +CreateFunctionEntryUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override; -virtual bool -CreateDefaultUnwindPlan (lldb_private::UnwindPlan &unwind_plan); +bool +CreateDefaultUnwindPlan(lldb_private::UnwindPlan &unwind_plan) override; -virtual bool -RegisterIsVolatile (const lldb_private::RegisterInfo *reg_info); +bool +RegisterIsVolatile(const lldb_private::RegisterInfo *reg_info) override; -virtual bool -CallFrameAddressIsValid (lldb::addr_t cfa) +bool +CallFrameAddressIsValid(lldb::addr_t cfa) override { // Make sure the stack call frame addresses are are 4 byte aligned if (cfa & (4ull - 1ull)) @@ -65,8 +59,8 @@ public: return true; } -virtual bool -CodeAddressIsValid (lldb::addr_t pc) +bool +CodeAddressIsValid(lldb::addr_t pc) override { // Just make sure the address is a valid 32 bit address. Bit zero // might be set due to Thumb function calls, so don't enforce 2 byte @@ -74,20 +68,21 @@ public: return pc <= UINT32_MAX; } -virtual lldb::addr_t -FixCodeAddress (lldb::addr_t pc) +lldb::addr_t +FixCodeAddress(lldb::addr_t pc) override { // ARM uses bit zero to signify a code address is thumb, so we must // strip bit zero in any code addresses. return pc & ~(lldb::addr_t)1; } -virtual const lldb_private::RegisterInfo * -GetRegisterInfoArray (uint32_t &count); +const lldb_private::RegisterInfo * +GetRegisterInfoArray(uint32_t &count) override; //-- // Static Functions //-- + static void Initialize(); @@ -103,13 +98,18 @@ public: //---
Re: [Lldb-commits] [PATCH] D13602: [LLDB] Fix Clang-tidy misc-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.
Eugene.Zelenko added a comment. Ping. Please review this patch, since these files is largest source of modernize-use-override warnings warnings in LLDB code. Repository: rL LLVM http://reviews.llvm.org/D13602 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13830: [LLDB] Fix Clang-tidy modernize-use-override warnings in some headers in source/Plugins/Process/Utility; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Herald added a subscriber: emaste. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D13830 Files: source/Plugins/Process/Utility/HistoryThread.h source/Plugins/Process/Utility/HistoryUnwind.h source/Plugins/Process/Utility/RegisterContextDarwin_arm.h source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h source/Plugins/Process/Utility/RegisterContextDarwin_i386.h source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h source/Plugins/Process/Utility/RegisterContextDummy.h source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h source/Plugins/Process/Utility/RegisterContextHistory.h source/Plugins/Process/Utility/RegisterContextLLDB.h source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h source/Plugins/Process/Utility/RegisterContextMemory.h source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h Index: source/Plugins/Process/Utility/RegisterContextLLDB.h === --- source/Plugins/Process/Utility/RegisterContextLLDB.h +++ source/Plugins/Process/Utility/RegisterContextLLDB.h @@ -10,8 +10,12 @@ #ifndef lldb_RegisterContextLLDB_h_ #define lldb_RegisterContextLLDB_h_ +// C Includes +// C++ Includes #include +// Other libraries and framework includes +// Project includes #include "lldb/lldb-private.h" #include "lldb/Target/RegisterContext.h" #include "lldb/Symbol/UnwindPlan.h" @@ -33,43 +37,40 @@ lldb_private::SymbolContext& sym_ctx, uint32_t frame_number, lldb_private::UnwindLLDB& unwind_lldb); -/// -// pure virtual functions from the base class that we must implement -/// +~RegisterContextLLDB() override = default; -virtual -~RegisterContextLLDB () { } +void +InvalidateAllRegisters() override; -virtual void -InvalidateAllRegisters (); +size_t +GetRegisterCount() override; -virtual size_t -GetRegisterCount (); +const lldb_private::RegisterInfo * +GetRegisterInfoAtIndex(size_t reg) override; -virtual const lldb_private::RegisterInfo * -GetRegisterInfoAtIndex (size_t reg); +size_t +GetRegisterSetCount() override; -virtual size_t -GetRegisterSetCount (); +const lldb_private::RegisterSet * +GetRegisterSet(size_t reg_set) override; -virtual const lldb_private::RegisterSet * -GetRegisterSet (size_t reg_set); +bool +ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue &value) override; -virtual bool -ReadRegister (const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); +bool +WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue &value) override; -virtual bool -WriteRegister (const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value); +bool +ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; -virtual bool -ReadAllRegisterValues (lldb::DataBufferSP &data_sp); +bool +WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; -virtual bool -WriteAllRegisterValues (const lldb::DataBufferSP &data_sp); +uint32_t +ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override; -virtual uint32_t -ConvertRegisterKindToRegisterNumber (lldb::RegisterKind kind, uint32_t num); - bool IsValid () const; @@ -99,7 +100,6 @@ // UnwindLLDB needs to pass around references to RegisterLocations friend class UnwindLLDB; - // Returns true if we have an unwind loop -- the same stack frame unwinding // multiple times. bool @@ -130,7 +130,6 @@ bool IsSkipFrame () const; - //-- /// Determines if a SymbolContext is a trap handler or not /// @@ -221,7 +220,6 @@ bool IsUnwindPlanValidForCurrentPC(lldb::UnwindPlanSP unwind_plan_sp, int &valid_pc_offset); - lldb_private::Thread& m_thread; /// @@ -269,4 +267,4 @@ } // namespace lldb_private -#endif // lldb_RegisterContextLLDB_h_ +#endif // lldb_RegisterContextLLDB_h_ Index: source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h === --- source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h +++ s
[Lldb-commits] [lldb] r250593 - [LLDB] Fix Clang-tidy modernize-use-override warnings in some headers in source/Plugins/Process/Utility; other minor fixes.
Author: eugenezelenko Date: Fri Oct 16 19:19:57 2015 New Revision: 250593 URL: http://llvm.org/viewvc/llvm-project?rev=250593&view=rev Log: [LLDB] Fix Clang-tidy modernize-use-override warnings in some headers in source/Plugins/Process/Utility; other minor fixes. Differential Revision: http://reviews.llvm.org/D13830 Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_i386.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextDummy.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextFreeBSD_powerpc.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextHistory.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextLLDB.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextMacOSXFrameBackchain.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextMemory.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.h Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h?rev=250593&r1=250592&r2=250593&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h (original) +++ lldb/trunk/source/Plugins/Process/Utility/HistoryThread.h Fri Oct 16 19:19:57 2015 @@ -10,6 +10,10 @@ #ifndef liblldb_HistoryThread_h_ #define liblldb_HistoryThread_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/lldb-private.h" #include "lldb/Host/Mutex.h" #include "lldb/Core/Broadcaster.h" @@ -37,52 +41,55 @@ class HistoryThread : public lldb_privat public: HistoryThread (lldb_private::Process &process, lldb::tid_t tid, std::vector pcs, uint32_t stop_id, bool stop_id_is_valid); -virtual ~HistoryThread (); +~HistoryThread() override; -virtual lldb::RegisterContextSP -GetRegisterContext (); +lldb::RegisterContextSP +GetRegisterContext() override; -virtual lldb::RegisterContextSP -CreateRegisterContextForFrame (StackFrame *frame); +lldb::RegisterContextSP +CreateRegisterContextForFrame(StackFrame *frame) override; -virtual void -RefreshStateAfterStop() { } +void +RefreshStateAfterStop() override { } bool -CalculateStopInfo () { return false; } +CalculateStopInfo() override +{ +return false; +} void -SetExtendedBacktraceToken (uint64_t token) +SetExtendedBacktraceToken(uint64_t token) override { m_extended_unwind_token = token; } uint64_t -GetExtendedBacktraceToken () +GetExtendedBacktraceToken() override { return m_extended_unwind_token; } const char * -GetQueueName () +GetQueueName() override { return m_queue_name.c_str(); } void -SetQueueName (const char *name) +SetQueueName(const char *name) override { m_queue_name = name; } lldb::queue_id_t -GetQueueID () +GetQueueID() override { return m_queue_id; } void -SetQueueID (lldb::queue_id_t queue) +SetQueueID(lldb::queue_id_t queue) override { m_queue_id = queue; } @@ -94,7 +101,7 @@ public: } uint32_t -GetExtendedBacktraceOriginatingIndexID (); +GetExtendedBacktraceOriginatingIndexID() override; void SetThreadName (const char *name) @@ -102,14 +109,14 @@ public: m_thread_name = name; } -virtual const char * -GetName () +const char * +GetName() override { return m_thread_name.c_str(); } -virtual void -SetName(const char *name) +void +SetName(const char *name) override { m_thread_name = name; } @@ -133,4 +140,4 @@ protected: } // namespace lldb_private -#endif // liblldb_HistoryThread_h_ +#endif // liblldb_HistoryThread_h_ Modified: lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/HistoryUnwind.h?rev=250593&r1=250592&r2=250593&view=diff == --- lldb/trunk/source/Plugins/Process/Utility/H
[Lldb-commits] [PATCH] D13840: [LLDB] Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D13840 Files: source/Plugins/Process/elf-core/ProcessElfCore.h source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h source/Plugins/Process/elf-core/ThreadElfCore.h source/Plugins/Process/mach-core/ProcessMachCore.h source/Plugins/Process/mach-core/ThreadMachCore.h source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.h source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h source/Plugins/SymbolVendor/ELF/SymbolVendorELF.h Index: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h === --- source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -1,4 +1,4 @@ -//===-- PythonDataObjects.h*- C++ -*-===// +//===-- PythonDataObjects.h--*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,7 +12,6 @@ // C Includes // C++ Includes - // Other libraries and framework includes // Project includes #include "lldb/lldb-defines.h" @@ -22,6 +21,7 @@ #include "lldb/Interpreter/OptionValue.h" namespace lldb_private { + class PythonString; class PythonList; class PythonDictionary; @@ -29,7 +29,7 @@ class StructuredPythonObject : public StructuredData::Generic { - public: +public: StructuredPythonObject() : StructuredData::Generic() { @@ -41,7 +41,7 @@ Py_XINCREF(GetValue()); } -virtual ~StructuredPythonObject() +~StructuredPythonObject() override { if (Py_IsInitialized()) Py_XDECREF(GetValue()); @@ -56,7 +56,7 @@ void Dump(Stream &s) const override; - private: +private: DISALLOW_COPY_AND_ASSIGN(StructuredPythonObject); }; @@ -104,7 +104,10 @@ Reset(rhs); } -virtual ~PythonObject() { Reset(); } +virtual ~PythonObject() +{ +Reset(); +} void Reset() @@ -304,6 +307,7 @@ StructuredData::DictionarySP CreateStructuredDictionary() const; }; + } // namespace lldb_private -#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H +#endif // LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_PYTHONDATAOBJECTS_H Index: source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h === --- source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h +++ source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h @@ -7,7 +7,6 @@ // //===--===// - #ifndef LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H #define LLDB_PLUGINS_SCRIPTINTERPRETER_PYTHON_SCRIPTINTERPRETERPYTHON_H @@ -17,6 +16,10 @@ #else +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/lldb-private.h" #include "PythonDataObjects.h" #include "lldb/Core/IOHandler.h" @@ -70,12 +73,19 @@ const lldb::ProcessSP& process_sp); typedef size_t (*SWIGPythonCalculateNumChildren) (void *implementor); + typedef void* (*SWIGPythonGetChildAtIndex)(void *implementor, uint32_t idx); + typedef int (*SWIGPythonGetIndexOfChildWithName)(void *implementor, const char* child_name); + typedef void* (*SWIGPythonCastPyObjectToSBValue) (void* data); + typedef lldb::ValueObjectSP (*SWIGPythonGetValueObjectSPFromSBValue) (void* data); + typedef bool(*SWIGPythonUpdateSynthProviderInstance)(void* data); + typedef bool(*SWIGPythonMightHaveChildrenSynthProviderInstance) (void* data); + typedef void* (*SWIGPythonGetValueSynthProviderInstance) (void *implementor); typedef bool(*SWIG
[Lldb-commits] [lldb] r250721 - Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Author: eugenezelenko Date: Mon Oct 19 13:52:10 2015 New Revision: 250721 URL: http://llvm.org/viewvc/llvm-project?rev=250721&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13840 Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h lldb/trunk/source/Plugins/Process/elf-core/ThreadElfCore.h lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.h lldb/trunk/source/Plugins/Process/mach-core/ThreadMachCore.h lldb/trunk/source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.h lldb/trunk/source/Plugins/SymbolFile/DWARF/LogChannelDWARF.h lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h lldb/trunk/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.h lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.h Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h?rev=250721&r1=250720&r2=250721&view=diff == --- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h (original) +++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.h Mon Oct 19 13:52:10 2015 @@ -1,4 +1,4 @@ -//===-- ProcessElfCore.h ---*- C++ -*-===// +//===-- ProcessElfCore.h *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,11 +17,13 @@ #ifndef liblldb_ProcessElfCore_h_ #define liblldb_ProcessElfCore_h_ +// C Includes // C++ Includes #include #include // Other libraries and framework includes +// Project includes #include "lldb/Core/ConstString.h" #include "lldb/Core/Error.h" #include "lldb/Target/Process.h" @@ -60,8 +62,7 @@ public: lldb_private::Listener &listener, const lldb_private::FileSpec &core_file); -virtual -~ProcessElfCore(); +~ProcessElfCore() override; //-- // Check if a given Process @@ -157,4 +158,4 @@ private: AddAddressRangeFromLoadSegment(const elf::ELFProgramHeader *header); }; -#endif // liblldb_ProcessElffCore_h_ +#endif // liblldb_ProcessElfCore_h_ Modified: lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h?rev=250721&r1=250720&r2=250721&view=diff == --- lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h (original) +++ lldb/trunk/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h Mon Oct 19 13:52:10 2015 @@ -1,15 +1,19 @@ -//===-- RegisterContextCorePOSIX_arm.h ---*- C++ -*-===// +//===-- RegisterContextCorePOSIX_arm.h --*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===-===// +//===--===// -#ifndef liblldb_RegisterContextCorePOSIX_arm_H_ -#define liblldb_RegisterContextCorePOSIX_arm_H_ +#ifndef liblldb_RegisterContextCorePOSIX_arm_h_ +#define liblldb_RegisterContextCorePOSIX_arm_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/DataBufferHeap.h" #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h" @@ -22,39 +26,41 @@ public: const lldb_private::DataExtractor &gpregset, const lldb_private::DataExtractor &fpregset); -~RegisterContextCorePOSIX_arm(); +~RegisterContextCorePOSIX_arm() override; -virtual bool -ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); +bool +ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::Regi
[Lldb-commits] [PATCH] D13876: [LLDB] Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D13876 Files: source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp source/Plugins/Language/CPlusPlus/LibCxxList.cpp source/Plugins/Language/CPlusPlus/LibCxxMap.cpp source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp source/Plugins/Language/CPlusPlus/LibCxxVector.cpp source/Plugins/Language/ObjC/Cocoa.cpp source/Plugins/Language/ObjC/NSArray.cpp source/Plugins/Language/ObjC/NSDictionary.cpp source/Plugins/Language/ObjC/NSIndexPath.cpp source/Plugins/Language/ObjC/NSSet.cpp source/Plugins/Language/ObjC/ObjCLanguage.cpp source/Plugins/Language/ObjC/ObjCLanguage.h source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h Index: source/Plugins/Language/ObjC/NSSet.cpp === --- source/Plugins/Language/ObjC/NSSet.cpp +++ source/Plugins/Language/ObjC/NSSet.cpp @@ -1,4 +1,4 @@ -//===-- NSSet.cpp *- C++ -*-===// +//===-- NSSet.cpp ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,10 @@ // //===--===// +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "NSSet.h" #include "lldb/Core/DataBufferHeap.h" @@ -43,45 +47,45 @@ namespace formatters { class NSSetISyntheticFrontEnd : public SyntheticChildrenFrontEnd { +public: +NSSetISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp); + +~NSSetISyntheticFrontEnd() override; + +size_t +CalculateNumChildren() override; + +lldb::ValueObjectSP +GetChildAtIndex(size_t idx) override; + +bool +Update() override; + +bool +MightHaveChildren() override; + +size_t +GetIndexOfChildWithName(const ConstString &name) override; + private: struct DataDescriptor_32 { uint32_t _used : 26; uint32_t _szidx : 6; }; + struct DataDescriptor_64 { uint64_t _used : 58; uint32_t _szidx : 6; }; - + struct SetItemDescriptor { lldb::addr_t item_ptr; lldb::ValueObjectSP valobj_sp; }; - -public: -NSSetISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp); - -virtual size_t -CalculateNumChildren (); - -virtual lldb::ValueObjectSP -GetChildAtIndex (size_t idx); - -virtual bool -Update(); - -virtual bool -MightHaveChildren (); - -virtual size_t -GetIndexOfChildWithName (const ConstString &name); - -virtual -~NSSetISyntheticFrontEnd (); -private: + ExecutionContextRef m_exe_ctx_ref; uint8_t m_ptr_size; DataDescriptor_32 *m_data_32; @@ -92,28 +96,26 @@ class NSOrderedSetSyntheticFrontEnd : public SyntheticChildrenFrontEnd { -private: - public: NSOrderedSetSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp); + +~NSOrderedSetSyntheticFrontEnd() override = default; + +size_t +CalculateNumChildren() override; -virtual size_t -CalculateNumChildren (); +lldb::ValueObjectSP +GetChildAtIndex(size_t idx) override; -virtual lldb::ValueObjectSP -GetChildAtIndex (size_t idx); +bool +Update() override; -virtual bool -Update(); +bool +MightHaveChildren() override; -virtual bool -MightHaveChildren (); - -virtual size_t -GetIndexOfChildWithName (const ConstString &name); - -virtual -~NSOrderedSetSyntheticFrontEnd (); +size_t +GetIndexOfChildWithName(const ConstString &name) override; + private: uint32_t m_count; std::map m_children; @@ -121,6 +123,26 @@ class NSSetMSyntheticFrontEnd : public SyntheticChi
[Lldb-commits] [lldb] r250789 - Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; other minor fixes.
Author: eugenezelenko Date: Mon Oct 19 20:10:59 2015 New Revision: 250789 URL: http://llvm.org/viewvc/llvm-project?rev=250789&view=rev Log: Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; other minor fixes. Differential Revision: http://reviews.llvm.org/D13876 Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h?rev=250789&r1=250788&r2=250789&view=diff == --- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h Mon Oct 19 20:10:59 2015 @@ -1,4 +1,4 @@ -//===-- CPlusPlusLanguage.h *- C++ -*-===// +//===-- CPlusPlusLanguage.h -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -116,10 +116,10 @@ public: bool m_parse_error; }; -virtual ~CPlusPlusLanguage() = default; - -CPlusPlusLanguage () = default; - +CPlusPlusLanguage() = default; + +~CPlusPlusLanguage() override = default; + lldb::LanguageType GetLanguageType () const override { @@ -171,17 +171,16 @@ public: static uint32_t FindEquivalentNames(ConstString type_name, std::vector& equivalents); - //-- // PluginInterface protocol //-- -virtual ConstString +ConstString GetPluginName() override; -virtual uint32_t +uint32_t GetPluginVersion() override; }; } // namespace lldb_private -#endif // liblldb_CPlusPlusLanguage_h_ +#endif // liblldb_CPlusPlusLanguage_h_ Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp?rev=250789&r1=250788&r2=250789&view=diff == --- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp (original) +++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp Mon Oct 19 20:10:59 2015 @@ -1,4 +1,4 @@ -//===-- LibCxxInitializerList.cpp --*- C++ -*-===// +//===-- LibCxxInitializerList.cpp ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,10 @@ // //===--===// +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "LibCxx.h" #include "lldb/Core/ConstString.h" @@ -23,24 +27,24 @@ namespace lldb_private { { public: LibcxxInitializerListSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp); + +~LibcxxInitializerListSyntheticFrontEnd() override; + +size_t +CalculateNumChildren() override; -virtual size_t -CalculateNumChildren (); - -virtual lldb::ValueObjectSP -GetChildAtIndex (size_t idx); +lldb::ValueObjectSP +GetChildAtIndex(size_t idx) override; -virtual bool -Update(); +bool +Update() override; -virtual bool -MightHaveChildren (); +bool +MightHaveChildren() override; -virtual size_t -GetIndexOfChildWithName (const ConstString &name); +size_t +GetIndexOfChildWithName(const ConstString &name) override; -virtual -~LibcxxInitializerListSyntheticFrontEnd (); private: ValueObject* m_start;
Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.cpp:10 @@ +9,3 @@ + +#include + Please add include section comments. Same for other sections. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.cpp:98 @@ +97,3 @@ + +~GoSliceSyntheticFrontEnd () override = default; + Please place destructor near constructor. Comment at: source/Plugins/Language/Go/GoLanguage.cpp:49 @@ +48,3 @@ +} + + Please use consistent spacing between methods. Comment at: source/Plugins/Language/Go/GoLanguage.h:31 @@ +30,3 @@ +public: +virtual ~GoLanguage() = default; + Please use override instead of virtual. Comment at: source/Plugins/Language/Go/GoLanguage.h:34 @@ +33,3 @@ +GoLanguage () = default; + +lldb::LanguageType Please place constructor before destructor. Comment at: source/Plugins/Language/Go/GoLanguage.h:65 @@ +64,3 @@ +//-- +virtual ConstString +GetPluginName() override; virtual is not needed. Please run clang-tidy modernize-use-override. Same for GetPluginVersion(). Repository: rL LLVM http://reviews.llvm.org/D13878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.
Eugene.Zelenko added inline comments. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.h:1 @@ +1,2 @@ +//===-- GoFormatterFunctions.h*- C++ -*-===// +// Such comments should be 80 characters long. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.h:15 @@ +14,3 @@ +#include + +#include "lldb/lldb-forward.h" Please add headers sections comments. Same for other sections. Clang headers should be before LLDB. Comment at: source/Plugins/Language/Go/GoLanguage.cpp:11 @@ +10,3 @@ +#include "GoLanguage.h" + +#include Please add headers sections comments. GoLanguage.h should be in LLDB headers section. Repository: rL LLVM http://reviews.llvm.org/D13878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.
Eugene.Zelenko added a comment. I think will be good idea to format code with Clang-format. See also http://reviews.llvm.org/rL250789 I just committed with similar cleanups for other languages. Repository: rL LLVM http://reviews.llvm.org/D13878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.
Eugene.Zelenko added inline comments. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.cpp:107 @@ +106,3 @@ + +} // anonymous namespace + One space should be enough. Repository: rL LLVM http://reviews.llvm.org/D13878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.
Eugene.Zelenko added inline comments. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.cpp:10 @@ +9,3 @@ + +#include + ribrdb wrote: > Eugene.Zelenko wrote: > > Please add include section comments. Same for other sections. > Which sections? I've seen a couple types of section markers in different > files, but it's not consistent. Are there documented recommendations for > these? See source/Plugins/Language/Go/GoLanguage.h below. At least this style is consistent across LLDB headers. Repository: rL LLVM http://reviews.llvm.org/D13878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D13878: Add data formatters for go strings and slices.
Eugene.Zelenko added a comment. Did you format code with Clang-format? Spaces/no spaces between function names and arguments are inconsistent. Comment at: source/Plugins/Language/Go/GoFormatterFunctions.h:29 @@ +28,3 @@ + +#include "clang/AST/ASTContext.h" + This header belongs to Other libraries and framework includes. Comment at: source/Plugins/Language/Go/GoLanguage.cpp:25 @@ +24,3 @@ + +#include +#include This and next include belong to C++ Includes. Repository: rL LLVM http://reviews.llvm.org/D13878 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13916: D13840 [LLDB] Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D13916 Files: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h source/Plugins/ExpressionParser/Clang/ClangUserExpression.h source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h Index: source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h === --- source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h +++ source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h @@ -10,6 +10,10 @@ #ifndef liblldb_AddressSanitizerRuntime_h_ #define liblldb_AddressSanitizerRuntime_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/lldb-private.h" #include "lldb/Target/ABI.h" #include "lldb/Target/InstrumentationRuntime.h" @@ -21,7 +25,8 @@ class AddressSanitizerRuntime : public lldb_private::InstrumentationRuntime { public: - +~AddressSanitizerRuntime() override; + static lldb::InstrumentationRuntimeSP CreateInstance (const lldb::ProcessSP &process_sp); @@ -36,26 +41,30 @@ static lldb::InstrumentationRuntimeType GetTypeStatic(); + +lldb_private::ConstString +GetPluginName() override +{ +return GetPluginNameStatic(); +} -virtual -~AddressSanitizerRuntime(); - -virtual lldb_private::ConstString -GetPluginName() { return GetPluginNameStatic(); } - virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); } -virtual uint32_t -GetPluginVersion() { return 1; } +uint32_t +GetPluginVersion() override +{ +return 1; +} -virtual void -ModulesDidLoad(lldb_private::ModuleList &module_list); +void +ModulesDidLoad(lldb_private::ModuleList &module_list) override; -virtual bool -IsActive(); +bool +IsActive() override; private: +AddressSanitizerRuntime(const lldb::ProcessSP &process_sp); lldb::ProcessSP GetProcessSP () @@ -63,8 +72,6 @@ return m_process_wp.lock(); } -AddressSanitizerRuntime(const lldb::ProcessSP &process_sp); - void Activate(); @@ -84,9 +91,8 @@ lldb::ModuleSP m_runtime_module; lldb::ProcessWP m_process_wp; lldb::user_id_t m_breakpoint_id; - }; } // namespace lldb_private -#endif // liblldb_InstrumentationRuntime_h_ +#endif // liblldb_AddressSanitizerRuntime_h_ Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h === --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h @@ -1,4 +1,4 @@ -//===-- EmulateInstructionARM64.h *- C++ -*-===// +//===-- EmulateInstructionARM64.h ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -10,6 +10,10 @@ #ifndef EmulateInstructionARM64_h_ #define EmulateInstructionARM64_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/EmulateInstruction.h" #include "lldb/Core/Error.h" #include "lldb/Interpreter/OptionValue.h" @@ -18,6 +22,14 @@ class EmulateInstructionARM64 : public lldb_private::EmulateInstruction { public: +EmulateInstructionARM64 (const lldb_private::ArchSpec &arch) : +EmulateInstruction (arch), +m_opcode_pstate (), +m_emulated_pstate (), +m_ignore_conditions (false) +{ +} + static void Initialize (); @@ -50,55 +62,46 @@ return false; } -virtual lldb_private::ConstString -GetPluginName(); +lldb_private::Const
[Lldb-commits] [lldb] r250872 - Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Author: eugenezelenko Date: Tue Oct 20 20:03:30 2015 New Revision: 250872 URL: http://llvm.org/viewvc/llvm-project?rev=250872&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13916 Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h lldb/trunk/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.h lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h lldb/trunk/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=250872&r1=250871&r2=250872&view=diff == --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original) +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Tue Oct 20 20:03:30 2015 @@ -7,8 +7,9 @@ // //===--===// -#include "DisassemblerLLVMC.h" - +// C Includes +// C++ Includes +// Project includes #include "llvm-c/Disassembler.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -25,6 +26,8 @@ #include "llvm/Support/TargetSelect.h" #include "llvm/ADT/SmallString.h" +// Other libraries and framework includes +#include "DisassemblerLLVMC.h" #include "lldb/Core/Address.h" #include "lldb/Core/DataExtractor.h" @@ -58,13 +61,10 @@ public: { } -virtual -~InstructionLLVMC () -{ -} +~InstructionLLVMC() override = default; -virtual bool -DoesBranch () +bool +DoesBranch() override { if (m_does_branch == eLazyBoolCalculate) { @@ -100,8 +100,8 @@ public: return m_does_branch == eLazyBoolYes; } -virtual bool -HasDelaySlot () +bool +HasDelaySlot() override { if (m_has_delay_slot == eLazyBoolCalculate) { @@ -155,10 +155,10 @@ public: return llvm_disasm.m_disasm_ap.get(); } -virtual size_t -Decode (const lldb_private::Disassembler &disassembler, -const lldb_private::DataExtractor &data, -lldb::offset_t data_offset) +size_t +Decode(const lldb_private::Disassembler &disassembler, + const lldb_private::DataExtractor &data, + lldb::offset_t data_offset) override { // All we have to do is read the opcode which can be easy for some // architectures @@ -272,8 +272,8 @@ public: } } -virtual void -CalculateMnemonicOperandsAndComment (const lldb_private::ExecutionContext *exe_ctx) +void +CalculateMnemonicOperandsAndComment(const lldb_private::ExecutionContext *exe_ctx) override { DataExtractor data; const AddressClass address_class = GetAddressClass (); @@ -452,8 +452,6 @@ protected: boolm_using_file_addr; }; - - DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner): m_is_valid(true) { @@ -521,10 +519,6 @@ DisassemblerLLVMC::LLVMCDisassembler::LL m_is_valid = false; } -DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler() -{ -} - uint64_t DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t *opcode_data, size_t opcode_data_len, @@ -605,7 +599,6 @@ DisassemblerLLVMC::FlavorValidForArchSpe return false; } - Disassembler * DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor) { @@ -782,10 +775,6 @@ DisassemblerLLVMC::DisassemblerLLVMC (co } } -DisassemblerLLVMC::~DisassemblerLLVMC() -{ -} - size_t DisassemblerLLVMC::DecodeInstructions (const Address &ba
[Lldb-commits] [lldb] r250874 - Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.
Author: eugenezelenko Date: Tue Oct 20 20:42:15 2015 New Revision: 250874 URL: http://llvm.org/viewvc/llvm-project?rev=250874&view=rev Log: Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures. Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=250874&r1=250873&r2=250874&view=diff == --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original) +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Tue Oct 20 20:42:15 2015 @@ -7,9 +7,8 @@ // //===--===// -// C Includes -// C++ Includes -// Project includes +#include "DisassemblerLLVMC.h" + #include "llvm-c/Disassembler.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -26,8 +25,6 @@ #include "llvm/Support/TargetSelect.h" #include "llvm/ADT/SmallString.h" -// Other libraries and framework includes -#include "DisassemblerLLVMC.h" #include "lldb/Core/Address.h" #include "lldb/Core/DataExtractor.h" @@ -61,10 +58,13 @@ public: { } -~InstructionLLVMC() override = default; +virtual +~InstructionLLVMC () +{ +} -bool -DoesBranch() override +virtual bool +DoesBranch () { if (m_does_branch == eLazyBoolCalculate) { @@ -100,8 +100,8 @@ public: return m_does_branch == eLazyBoolYes; } -bool -HasDelaySlot() override +virtual bool +HasDelaySlot () { if (m_has_delay_slot == eLazyBoolCalculate) { @@ -155,10 +155,10 @@ public: return llvm_disasm.m_disasm_ap.get(); } -size_t -Decode(const lldb_private::Disassembler &disassembler, - const lldb_private::DataExtractor &data, - lldb::offset_t data_offset) override +virtual size_t +Decode (const lldb_private::Disassembler &disassembler, +const lldb_private::DataExtractor &data, +lldb::offset_t data_offset) { // All we have to do is read the opcode which can be easy for some // architectures @@ -272,8 +272,8 @@ public: } } -void -CalculateMnemonicOperandsAndComment(const lldb_private::ExecutionContext *exe_ctx) override +virtual void +CalculateMnemonicOperandsAndComment (const lldb_private::ExecutionContext *exe_ctx) { DataExtractor data; const AddressClass address_class = GetAddressClass (); @@ -452,6 +452,8 @@ protected: boolm_using_file_addr; }; + + DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner): m_is_valid(true) { @@ -519,6 +521,10 @@ DisassemblerLLVMC::LLVMCDisassembler::LL m_is_valid = false; } +DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler() +{ +} + uint64_t DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t *opcode_data, size_t opcode_data_len, @@ -599,6 +605,7 @@ DisassemblerLLVMC::FlavorValidForArchSpe return false; } + Disassembler * DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor) { @@ -775,6 +782,10 @@ DisassemblerLLVMC::DisassemblerLLVMC (co } } +DisassemblerLLVMC::~DisassemblerLLVMC() +{ +} + size_t DisassemblerLLVMC::DecodeInstructions (const Address &base_addr, const DataExtractor& data, Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h?rev=250874&r1=250873&r2=250874&view=diff == --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h (original) +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h Tue Oct 20 20:42:15 2015 @@ -10,19 +10,10 @@ #ifndef liblldb_DisassemblerLLVMC_h_ #define liblldb_DisassemblerLLVMC_h_ -// C Includes -// C++ Includes #include -// Other libraries and framework includes #include "llvm-c/Disassembler.h" -// Project includes -#include "lldb/Core/Address.h" -#include "lldb/Core/Disassembler.h" -#include "lldb/Core/PluginManager.h" -#include "lldb/Host/Mutex.h" - // Opaque references to C++ Objects in LLVM's MC. namespace llvm { @@ -34,7 +25,12 @@ namespace llvm class MCInstPrinter; class MCAsmInfo; class MCSubtargetInfo; -} // namespace llvm +} + +#include "lldb/Core/Address.h" +#include "lldb/Core/Disassembler.h" +#
Re: [Lldb-commits] [lldb] r250874 - Revert r250872 in source/Plugins/Disassembler to fix MSVC builds failures.
Hi, Zachary! On Tue, Oct 20, 2015 at 8:25 PM, Zachary Turner wrote: > You can probably put this CL back in, just make sure you #include the > appropriate file from LLVM in the header file. Actually I only changed order of headers and forward declarations. Unfortunately I don't have access to MSVC, so somebody else help is needed to fix problem properly. Eugene. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D13951: [LLDB] Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D13951 Files: source/Plugins/JITLoader/GDB/JITLoaderGDB.h source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp source/Plugins/OperatingSystem/Go/OperatingSystemGo.h source/Plugins/OperatingSystem/Python/OperatingSystemPython.h source/Plugins/Process/Utility/RegisterContextThreadMemory.h source/Plugins/Process/Utility/StopInfoMachException.h source/Plugins/Process/Utility/ThreadMemory.h source/Plugins/Process/Utility/UnwindLLDB.h source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h Index: source/Plugins/JITLoader/GDB/JITLoaderGDB.h === --- source/Plugins/JITLoader/GDB/JITLoaderGDB.h +++ source/Plugins/JITLoader/GDB/JITLoaderGDB.h @@ -13,15 +13,19 @@ // C Includes // C++ Includes #include -#include -#include +// Other libraries and framework includes +// Project includes #include "lldb/Target/JITLoader.h" #include "lldb/Target/Process.h" class JITLoaderGDB : public lldb_private::JITLoader { public: +JITLoaderGDB(lldb_private::Process *process); + +~JITLoaderGDB() override; + //-- // Static Functions //-- @@ -40,34 +44,29 @@ static lldb::JITLoaderSP CreateInstance (lldb_private::Process *process, bool force); -JITLoaderGDB (lldb_private::Process *process); - static void DebuggerInitialize(lldb_private::Debugger &debugger); -virtual -~JITLoaderGDB (); - //-- // PluginInterface protocol //-- -virtual lldb_private::ConstString -GetPluginName(); +lldb_private::ConstString +GetPluginName() override; -virtual uint32_t -GetPluginVersion(); +uint32_t +GetPluginVersion() override; //-- // JITLoader interface //-- -virtual void -DidAttach (); +void +DidAttach() override; -virtual void -DidLaunch (); +void +DidLaunch() override; -virtual void -ModulesDidLoad (lldb_private::ModuleList &module_list); +void +ModulesDidLoad(lldb_private::ModuleList &module_list) override; private: lldb::addr_t @@ -108,4 +107,4 @@ }; -#endif +#endif // liblldb_JITLoaderGDB_h_ Index: source/Plugins/Process/Utility/UnwindLLDB.h === --- source/Plugins/Process/Utility/UnwindLLDB.h +++ source/Plugins/Process/Utility/UnwindLLDB.h @@ -10,8 +10,12 @@ #ifndef lldb_UnwindLLDB_h_ #define lldb_UnwindLLDB_h_ +// C Includes +// C++ Includes #include +// Other libraries and framework includes +// Project includes #include "lldb/lldb-public.h" #include "lldb/Core/ConstString.h" #include "lldb/Symbol/FuncUnwinders.h" @@ -27,10 +31,9 @@ { public: UnwindLLDB (lldb_private::Thread &thread); - -virtual -~UnwindLLDB() { } +~UnwindLLDB() override = default; + enum RegisterSearchResult { eRegisterFound = 0, @@ -62,23 +65,23 @@ }; void -DoClear() +DoClear() override { m_frames.clear(); m_candidate_frame.reset(); m_unwind_complete = false; } -virtual uint32_t -DoGetFrameCount(); +uint32_t +DoGetFrameCount() override; bool -DoGetFrameInfoAtIndex (uint32_t frame_idx, - lldb::addr_t& cfa, - lldb::addr_t& start_pc); +DoGetFrameInfoAtIndex(uint32_t frame_idx, + lldb::addr_t& cfa, + lldb::addr_t& start_pc) override; lldb::RegisterContextSP -DoCreateRegisterContextForFrame (lldb_private::StackFrame *frame); +DoCreateRegisterContextForFrame(lldb_private::StackFrame *frame) override; typedef std::shared_ptr RegisterContextLLDBSP; @@ -112,7 +115,6 @@ } private: - struct Cursor { lldb::addr_t start_pc; // The start address of the function/symbol for this frame - current pc if unknown @@ -149,6 +151,6 @@ DISALLOW_COPY_AND_ASSIGN (UnwindLLDB); }; -} // namespace lldb_private +} // namespace lldb_private -#endif // lldb_UnwindLLDB_h_ +#endif // lldb_U
[Lldb-commits] [lldb] r250925 - Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Author: eugenezelenko Date: Wed Oct 21 13:46:17 2015 New Revision: 250925 URL: http://llvm.org/viewvc/llvm-project?rev=250925&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. Differential Revision: http://reviews.llvm.org/D13951 Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.h lldb/trunk/source/Plugins/Process/Utility/RegisterContextThreadMemory.h lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.h lldb/trunk/source/Plugins/Process/Utility/ThreadMemory.h lldb/trunk/source/Plugins/Process/Utility/UnwindLLDB.h lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.h lldb/trunk/source/Plugins/SystemRuntime/MacOSX/SystemRuntimeMacOSX.h lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h Modified: lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h?rev=250925&r1=250924&r2=250925&view=diff == --- lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h (original) +++ lldb/trunk/source/Plugins/JITLoader/GDB/JITLoaderGDB.h Wed Oct 21 13:46:17 2015 @@ -13,15 +13,19 @@ // C Includes // C++ Includes #include -#include -#include +// Other libraries and framework includes +// Project includes #include "lldb/Target/JITLoader.h" #include "lldb/Target/Process.h" class JITLoaderGDB : public lldb_private::JITLoader { public: +JITLoaderGDB(lldb_private::Process *process); + +~JITLoaderGDB() override; + //-- // Static Functions //-- @@ -40,34 +44,29 @@ public: static lldb::JITLoaderSP CreateInstance (lldb_private::Process *process, bool force); -JITLoaderGDB (lldb_private::Process *process); - static void DebuggerInitialize(lldb_private::Debugger &debugger); -virtual -~JITLoaderGDB (); - //-- // PluginInterface protocol //-- -virtual lldb_private::ConstString -GetPluginName(); +lldb_private::ConstString +GetPluginName() override; -virtual uint32_t -GetPluginVersion(); +uint32_t +GetPluginVersion() override; //-- // JITLoader interface //-- -virtual void -DidAttach (); +void +DidAttach() override; -virtual void -DidLaunch (); +void +DidLaunch() override; -virtual void -ModulesDidLoad (lldb_private::ModuleList &module_list); +void +ModulesDidLoad(lldb_private::ModuleList &module_list) override; private: lldb::addr_t @@ -108,4 +107,4 @@ private: }; -#endif +#endif // liblldb_JITLoaderGDB_h_ Modified: lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp?rev=250925&r1=250924&r2=250925&view=diff == --- lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp (original) +++ lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp Wed Oct 21 13:46:17 2015 @@ -1,4 +1,4 @@ -//===-- OperatingSystemGo.cpp *- C++ -*-===// +//===-- OperatingSystemGo.cpp ---*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -6,13 +6,15 @@ // License. See LICENSE.TXT for details. // //===--===// -#include "OperatingSystemGo.h" // C Includes // C++ Includes #include // Other libraries and framework includes +// Project includes +#include "OperatingSystemGo.h" + #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" @@ -56,13 +58,7 @@ enum class PluginProperties : public Properties { - public: -static ConstString -GetSettingName() -{ -return OperatingSystemGo::GetPluginNameStatic(); -} - +public: PluginProperties() : Properties() { @@ -70,7 +66,13 @@ class PluginProperties : public Properti m_collection_sp->Initialize(g_properties); } -virtual ~Pl
[Lldb-commits] [lldb] r250937 - Revert r250925 in source/Plugins/OperatingSystem/Go to fix MSVC builds failures.
Author: eugenezelenko Date: Wed Oct 21 15:03:58 2015 New Revision: 250937 URL: http://llvm.org/viewvc/llvm-project?rev=250937&view=rev Log: Revert r250925 in source/Plugins/OperatingSystem/Go to fix MSVC builds failures. Modified: lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h Modified: lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp?rev=250937&r1=250936&r2=250937&view=diff == --- lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp (original) +++ lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp Wed Oct 21 15:03:58 2015 @@ -1,4 +1,4 @@ -//===-- OperatingSystemGo.cpp ---*- C++ -*-===// +//===-- OperatingSystemGo.cpp *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -6,15 +6,13 @@ // License. See LICENSE.TXT for details. // //===--===// +#include "OperatingSystemGo.h" // C Includes // C++ Includes #include // Other libraries and framework includes -// Project includes -#include "OperatingSystemGo.h" - #include "lldb/Core/DataBufferHeap.h" #include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" @@ -58,7 +56,13 @@ enum class PluginProperties : public Properties { -public: + public: +static ConstString +GetSettingName() +{ +return OperatingSystemGo::GetPluginNameStatic(); +} + PluginProperties() : Properties() { @@ -66,13 +70,7 @@ public: m_collection_sp->Initialize(g_properties); } -~PluginProperties() override = default; - -static ConstString -GetSettingName() -{ -return OperatingSystemGo::GetPluginNameStatic(); -} +virtual ~PluginProperties() {} bool GetEnableGoroutines() @@ -102,7 +100,10 @@ GetGlobalPluginProperties() class RegisterContextGo : public RegisterContextMemory { -public: + public: +//-- +// Constructors and Destructors +//-- RegisterContextGo(lldb_private::Thread &thread, uint32_t concrete_frame_idx, DynamicRegisterInfo ®_info, lldb::addr_t reg_data_addr) : RegisterContextMemory(thread, concrete_frame_idx, reg_info, reg_data_addr) @@ -117,11 +118,10 @@ public: m_reg_data.SetData(reg_data_sp); } -~RegisterContextGo() override = default; +virtual ~RegisterContextGo() {} -bool -ReadRegister(const lldb_private::RegisterInfo *reg_info, - lldb_private::RegisterValue ®_value) override +virtual bool +ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue ®_value) { switch (reg_info->kinds[eRegisterKindGeneric]) { @@ -134,9 +134,8 @@ public: } } -bool -WriteRegister(const lldb_private::RegisterInfo *reg_info, - const lldb_private::RegisterValue ®_value) override +virtual bool +WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue ®_value) { switch (reg_info->kinds[eRegisterKindGeneric]) { @@ -148,11 +147,11 @@ public: } } -private: + private: DISALLOW_COPY_AND_ASSIGN(RegisterContextGo); }; -} // anonymous namespace +} // namespace struct OperatingSystemGo::Goroutine { @@ -220,12 +219,6 @@ OperatingSystemGo::CreateInstance(Proces return new OperatingSystemGo(process); } -OperatingSystemGo::OperatingSystemGo(lldb_private::Process *process) -: OperatingSystem(process) -, m_reginfo(new DynamicRegisterInfo) -{ -} - ConstString OperatingSystemGo::GetPluginNameStatic() { @@ -239,6 +232,16 @@ OperatingSystemGo::GetPluginDescriptionS return "Operating system plug-in that reads runtime data-structures for goroutines."; } +OperatingSystemGo::OperatingSystemGo(lldb_private::Process *process) +: OperatingSystem(process) +, m_reginfo(new DynamicRegisterInfo) +{ +} + +OperatingSystemGo::~OperatingSystemGo() +{ +} + bool OperatingSystemGo::Init(ThreadList &threads) { Modified: lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h?rev=250937&r1=250936&r2=250937&view=diff == --- lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h (original) +++ lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h Wed Oct 21 15:03:58 20
[Lldb-commits] [PATCH] D13966: [LLDB] Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins/LanguageRuntime; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D13966 Files: source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h === --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h @@ -12,15 +12,13 @@ // C Includes // C++ Includes - // Other libraries and framework includes +#include "clang/AST/ASTContext.h" // Project includes #include "lldb/lldb-private.h" #include "lldb/Target/ObjCLanguageRuntime.h" -#include "clang/AST/ASTContext.h" - namespace lldb_utility { class StringLexer; } @@ -31,9 +29,10 @@ { public: AppleObjCTypeEncodingParser (ObjCLanguageRuntime& runtime); -virtual CompilerType RealizeType (clang::ASTContext &ast_ctx, const char* name, bool for_expression); -virtual ~AppleObjCTypeEncodingParser() {} +~AppleObjCTypeEncodingParser() override = default; +CompilerType RealizeType(clang::ASTContext &ast_ctx, const char* name, bool for_expression) override; + private: struct StructElement { std::string name; @@ -79,4 +78,4 @@ } // namespace lldb_private -#endif // liblldb_AppleObjCTypeEncodingParser_h_ +#endif // liblldb_AppleObjCTypeEncodingParser_h_ Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h === --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h @@ -1,4 +1,4 @@ -//===-- AppleObjCRuntimeV2.h *- C++ -*-===// +//===-- AppleObjCRuntimeV2.h *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,7 +12,6 @@ // C Includes // C++ Includes - #include #include @@ -30,31 +29,8 @@ public AppleObjCRuntime { public: -static bool classof(const ObjCLanguageRuntime* runtime) -{ -switch (runtime->GetRuntimeVersion()) -{ -case ObjCRuntimeVersions::eAppleObjC_V2: -return true; -default: -return false; -} -} +~AppleObjCRuntimeV2() override = default; -virtual ~AppleObjCRuntimeV2(); - -// These are generic runtime functions: -virtual bool -GetDynamicTypeAndAddress (ValueObject &in_value, - lldb::DynamicValueType use_dynamic, - TypeAndOrName &class_type_or_name, - Address &address, - Value::ValueType &value_type); - -virtual UtilityFunction * -CreateObjectChecker (const char *); - - //-- // Static Functions //-- @@ -69,28 +45,74 @@ static lldb_private::ConstString GetPluginNameStatic(); + +static bool classof(const ObjCLanguageRuntime* runtime) +{ +switch (runtime->GetRuntimeVersion()) +{ +case ObjCRuntimeVersions::eAppleObjC_V2: +return true; +default: +return false; +} +} + +// These are generic runtime functions: +bool +GetDynamicTypeAndAddress(ValueObject &in_value, + lldb::DynamicValueType use_dynamic, + TypeAndOrName &class_type_or_name, + Address &address, + Value::ValueType &value_type) override; +UtilityFunction * +CreateObjectChecker(const char *) override; + //--
[Lldb-commits] [lldb] r250966 - Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins/LanguageRuntime; other minor fixes.
Author: eugenezelenko Date: Wed Oct 21 19:45:41 2015 New Revision: 250966 URL: http://llvm.org/viewvc/llvm-project?rev=250966&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins/LanguageRuntime; other minor fixes. Differential Revision: http://reviews.llvm.org/D13966 Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h lldb/trunk/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.h lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h?rev=250966&r1=250965&r2=250966&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h Wed Oct 21 19:45:41 2015 @@ -1,4 +1,4 @@ -//===-- ItaniumABILanguageRuntime.h *- C++ -*-===// +//===-- ItaniumABILanguageRuntime.h -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,6 +12,8 @@ // C Includes // C++ Includes +#include + // Other libraries and framework includes // Project includes #include "lldb/lldb-private.h" @@ -20,33 +22,13 @@ #include "lldb/Target/CPPLanguageRuntime.h" #include "lldb/Core/Value.h" -#include -#include - namespace lldb_private { class ItaniumABILanguageRuntime : public lldb_private::CPPLanguageRuntime { public: -~ItaniumABILanguageRuntime() { } - -virtual bool -IsVTableName (const char *name); - -virtual bool -GetDynamicTypeAndAddress (ValueObject &in_value, - lldb::DynamicValueType use_dynamic, - TypeAndOrName &class_type_or_name, - Address &address, - Value::ValueType &value_type); - -virtual TypeAndOrName -FixUpDynamicType (const TypeAndOrName& type_and_or_name, - ValueObject& static_value); - -virtual bool -CouldHaveDynamicValue (ValueObject &in_value); +~ItaniumABILanguageRuntime() override = default; //-- // Static Functions @@ -63,38 +45,54 @@ namespace lldb_private { static lldb_private::ConstString GetPluginNameStatic(); -//-- -// PluginInterface protocol -//-- -virtual lldb_private::ConstString -GetPluginName(); - -virtual uint32_t -GetPluginVersion(); +bool +IsVTableName(const char *name) override; -virtual void -SetExceptionBreakpoints (); +bool +GetDynamicTypeAndAddress(ValueObject &in_value, + lldb::DynamicValueType use_dynamic, + TypeAndOrName &class_type_or_name, + Address &address, + Value::ValueType &value_type) override; + +TypeAndOrName +FixUpDynamicType(const TypeAndOrName& type_and_or_name, + ValueObject& static_value) override; + +bool +CouldHaveDynamicValue(ValueObject &in_value) override; + +void +SetExceptionBreakpoints() override; -virtual void -ClearExceptionBreakpoints (); +void +ClearExceptionBreakpoints() override; -virtual bool -ExceptionBreakpointsAreSet (); +bool +ExceptionBreakpointsAreSet() override; -virtual bool -ExceptionBreakpointsExplainStop (lldb::StopInfoSP sto
[Lldb-commits] [PATCH] D13968: [LLDB] Attempt to fix MSVC builds after rL250966
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: brucem, labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Looks like MSVC build failure didn't relate to my changes, since I didn't remove lldb/Expression/UtilityFunction.h from any of files changed in rL250966. May be source/Plugins/LanguageRuntime was not properly rebuilt after other change? Repository: rL LLVM http://reviews.llvm.org/D13968 Files: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h === --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -14,18 +14,18 @@ // C++ Includes #include #include + // Other libraries and framework includes // Project includes #include "lldb/lldb-public.h" #include "lldb/Host/Mutex.h" +#include "lldb/Expression/UtilityFunction.h" - namespace lldb_private { class AppleObjCTrampolineHandler { public: - AppleObjCTrampolineHandler (const lldb::ProcessSP &process_sp, const lldb::ModuleSP &objc_module_sp); @@ -44,7 +44,6 @@ return (addr == m_msg_forward_addr || addr == m_msg_forward_stret_addr); } - struct DispatchFunction { public: typedef enum @@ -92,7 +91,6 @@ lldb::addr_t code_start; }; - class VTableRegion { public: @@ -189,7 +187,6 @@ lldb::break_id_t m_trampolines_changed_bp_id; region_collection m_regions; lldb::ModuleSP m_objc_module_sp; - }; static const DispatchFunction g_dispatch_functions[]; @@ -205,10 +202,8 @@ lldb::addr_t m_msg_forward_addr; lldb::addr_t m_msg_forward_stret_addr; std::unique_ptr m_vtables_ap; - - }; -} // using namespace lldb_private +} // namespace lldb_private -#endif // lldb_AppleObjCTrampolineHandler_h_ +#endif // lldb_AppleObjCTrampolineHandler_h_ Index: source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h === --- source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h +++ source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h @@ -14,18 +14,18 @@ // C++ Includes #include #include + // Other libraries and framework includes // Project includes #include "lldb/lldb-public.h" #include "lldb/Host/Mutex.h" +#include "lldb/Expression/UtilityFunction.h" - namespace lldb_private { class AppleObjCTrampolineHandler { public: - AppleObjCTrampolineHandler (const lldb::ProcessSP &process_sp, const lldb::ModuleSP &objc_module_sp); @@ -44,7 +44,6 @@ return (addr == m_msg_forward_addr || addr == m_msg_forward_stret_addr); } - struct DispatchFunction { public: typedef enum @@ -92,7 +91,6 @@ lldb::addr_t code_start; }; - class VTableRegion { public: @@ -189,7 +187,6 @@ lldb::break_id_t m_trampolines_changed_bp_id; region_collection m_regions; lldb::ModuleSP m_objc_module_sp; - }; static const DispatchFunction g_dispatch_functions[]; @@ -205,10 +202,8 @@ lldb::addr_t m_msg_forward_addr; lldb::addr_t m_msg_forward_stret_addr; std::unique_ptr m_vtables_ap; - - }; -} // using namespace lldb_private +} // namespace lldb_private -#endif // lldb_AppleObjCTrampolineHandler_h_ +#endif // lldb_AppleObjCTrampolineHandler_h_ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r251031 - Attempt to fix MSVC builds after rL250966.
Author: eugenezelenko Date: Thu Oct 22 12:01:20 2015 New Revision: 251031 URL: http://llvm.org/viewvc/llvm-project?rev=251031&view=rev Log: Attempt to fix MSVC builds after rL250966. Differential Revision: http://reviews.llvm.org/D13968 Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h?rev=251031&r1=251030&r2=251031&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h Thu Oct 22 12:01:20 2015 @@ -14,18 +14,18 @@ // C++ Includes #include #include + // Other libraries and framework includes // Project includes #include "lldb/lldb-public.h" #include "lldb/Host/Mutex.h" - +#include "lldb/Expression/UtilityFunction.h" namespace lldb_private { class AppleObjCTrampolineHandler { public: - AppleObjCTrampolineHandler (const lldb::ProcessSP &process_sp, const lldb::ModuleSP &objc_module_sp); @@ -44,7 +44,6 @@ public: return (addr == m_msg_forward_addr || addr == m_msg_forward_stret_addr); } - struct DispatchFunction { public: typedef enum @@ -92,7 +91,6 @@ private: lldb::addr_t code_start; }; - class VTableRegion { public: @@ -189,7 +187,6 @@ private: lldb::break_id_t m_trampolines_changed_bp_id; region_collection m_regions; lldb::ModuleSP m_objc_module_sp; - }; static const DispatchFunction g_dispatch_functions[]; @@ -205,10 +202,8 @@ private: lldb::addr_t m_msg_forward_addr; lldb::addr_t m_msg_forward_stret_addr; std::unique_ptr m_vtables_ap; - - }; -} // using namespace lldb_private +} // namespace lldb_private -#endif // lldb_AppleObjCTrampolineHandler_h_ +#endif // lldb_AppleObjCTrampolineHandler_h_ ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r251054 - Fix Clang-tidy modernize-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes.
Author: eugenezelenko Date: Thu Oct 22 14:59:21 2015 New Revision: 251054 URL: http://llvm.org/viewvc/llvm-project?rev=251054&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in include/lldb/Interpreter and Host; other minor fixes. Differential Revision: http://reviews.llvm.org/D13602 Modified: lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h lldb/trunk/include/lldb/Interpreter/CommandCompletions.h lldb/trunk/include/lldb/Interpreter/CommandHistory.h lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h lldb/trunk/include/lldb/Interpreter/CommandObjectRegexCommand.h lldb/trunk/include/lldb/Interpreter/CommandOptionValidators.h lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h lldb/trunk/include/lldb/Interpreter/OptionGroupBoolean.h lldb/trunk/include/lldb/Interpreter/OptionGroupFile.h lldb/trunk/include/lldb/Interpreter/OptionGroupFormat.h lldb/trunk/include/lldb/Interpreter/OptionGroupOutputFile.h lldb/trunk/include/lldb/Interpreter/OptionGroupPlatform.h lldb/trunk/include/lldb/Interpreter/OptionGroupString.h lldb/trunk/include/lldb/Interpreter/OptionGroupUInt64.h lldb/trunk/include/lldb/Interpreter/OptionGroupUUID.h lldb/trunk/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h lldb/trunk/include/lldb/Interpreter/OptionGroupVariable.h lldb/trunk/include/lldb/Interpreter/OptionGroupWatchpoint.h lldb/trunk/include/lldb/Interpreter/Options.h lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Modified: lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h?rev=251054&r1=251053&r2=251054&view=diff == --- lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h (original) +++ lldb/trunk/include/lldb/Host/MonitoringProcessLauncher.h Thu Oct 22 14:59:21 2015 @@ -10,6 +10,10 @@ #ifndef lldb_Host_MonitoringProcessLauncher_h_ #define lldb_Host_MonitoringProcessLauncher_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Host/ProcessLauncher.h" namespace lldb_private @@ -20,11 +24,12 @@ class MonitoringProcessLauncher : public public: explicit MonitoringProcessLauncher(std::unique_ptr delegate_launcher); -virtual HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error); +HostProcess LaunchProcess(const ProcessLaunchInfo &launch_info, Error &error) override; private: std::unique_ptr m_delegate_launcher; }; -} -#endif +} // namespace lldb_private + +#endif // lldb_Host_MonitoringProcessLauncher_h_ Modified: lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h?rev=251054&r1=251053&r2=251054&view=diff == --- lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h (original) +++ lldb/trunk/include/lldb/Host/posix/HostProcessPosix.h Thu Oct 22 14:59:21 2015 @@ -10,6 +10,10 @@ #ifndef lldb_Host_HostProcesPosix_h_ #define lldb_Host_HostProcesPosix_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/lldb-types.h" #include "lldb/Core/Error.h" #include "lldb/Host/HostNativeProcessBase.h" @@ -24,7 +28,7 @@ class HostProcessPosix : public HostNati public: HostProcessPosix(); HostProcessPosix(lldb::process_t process); -virtual ~HostProcessPosix(); +~HostProcessPosix() override; virtual Error Signal(int signo) const; static Error Signal(lldb::process_t process, int signo); @@ -37,6 +41,7 @@ class HostProcessPosix : public HostNati HostThread StartMonitoring(HostProcess::MonitorCallback callback, void *callback_baton, bool monitor_signals) override; }; -} -#endif +} // namespace lldb_private + +#endif // lldb_Host_HostProcesPosix_h_ Modified: lldb/trunk/include/lldb/Interpreter/CommandCompletions.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandCompletions.h?rev=251054&r1=251053&r2=251054&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandCompletions.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandCompletions.h Thu Oct 22 14:59:21 2015 @@ -54,7 +54,6 @@ public: // so you can add custom enums starting from here in your Option class. // Also if you & in this bit the base code will not process the option. eCustomCompletion = (1u << 9) - } CommonCompletionTypes;
[Lldb-commits] [lldb] r251066 - Fix Clang-tidy modernize-use-override warnings in include/lldb/Disassembler and OperatingSystem; other minor fixes.
Author: eugenezelenko Date: Thu Oct 22 16:24:37 2015 New Revision: 251066 URL: http://llvm.org/viewvc/llvm-project?rev=251066&view=rev Log: Fix Clang-tidy modernize-use-override warnings in include/lldb/Disassembler and OperatingSystem; other minor fixes. Second attempt which should work for MSVC. Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp lldb/trunk/source/Plugins/OperatingSystem/Go/OperatingSystemGo.h Modified: lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp?rev=251066&r1=251065&r2=251066&view=diff == --- lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp (original) +++ lldb/trunk/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp Thu Oct 22 16:24:37 2015 @@ -7,8 +7,9 @@ // //===--===// -#include "DisassemblerLLVMC.h" - +// C Includes +// C++ Includes +// Project includes #include "llvm-c/Disassembler.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -25,6 +26,8 @@ #include "llvm/Support/TargetSelect.h" #include "llvm/ADT/SmallString.h" +// Other libraries and framework includes +#include "DisassemblerLLVMC.h" #include "lldb/Core/Address.h" #include "lldb/Core/DataExtractor.h" @@ -58,13 +61,10 @@ public: { } -virtual -~InstructionLLVMC () -{ -} +~InstructionLLVMC() override = default; -virtual bool -DoesBranch () +bool +DoesBranch() override { if (m_does_branch == eLazyBoolCalculate) { @@ -100,8 +100,8 @@ public: return m_does_branch == eLazyBoolYes; } -virtual bool -HasDelaySlot () +bool +HasDelaySlot() override { if (m_has_delay_slot == eLazyBoolCalculate) { @@ -155,10 +155,10 @@ public: return llvm_disasm.m_disasm_ap.get(); } -virtual size_t -Decode (const lldb_private::Disassembler &disassembler, -const lldb_private::DataExtractor &data, -lldb::offset_t data_offset) +size_t +Decode(const lldb_private::Disassembler &disassembler, + const lldb_private::DataExtractor &data, + lldb::offset_t data_offset) override { // All we have to do is read the opcode which can be easy for some // architectures @@ -272,8 +272,8 @@ public: } } -virtual void -CalculateMnemonicOperandsAndComment (const lldb_private::ExecutionContext *exe_ctx) +void +CalculateMnemonicOperandsAndComment(const lldb_private::ExecutionContext *exe_ctx) override { DataExtractor data; const AddressClass address_class = GetAddressClass (); @@ -452,8 +452,6 @@ protected: boolm_using_file_addr; }; - - DisassemblerLLVMC::LLVMCDisassembler::LLVMCDisassembler (const char *triple, const char *cpu, const char *features_str, unsigned flavor, DisassemblerLLVMC &owner): m_is_valid(true) { @@ -521,9 +519,7 @@ DisassemblerLLVMC::LLVMCDisassembler::LL m_is_valid = false; } -DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler() -{ -} +DisassemblerLLVMC::LLVMCDisassembler::~LLVMCDisassembler() = default; uint64_t DisassemblerLLVMC::LLVMCDisassembler::GetMCInst (const uint8_t *opcode_data, @@ -587,38 +583,6 @@ DisassemblerLLVMC::LLVMCDisassembler::Ha return m_instr_info_ap->get(mc_inst.getOpcode()).hasDelaySlot(); } -bool -DisassemblerLLVMC::FlavorValidForArchSpec (const lldb_private::ArchSpec &arch, const char *flavor) -{ -llvm::Triple triple = arch.GetTriple(); -if (flavor == NULL || strcmp (flavor, "default") == 0) -return true; - -if (triple.getArch() == llvm::Triple::x86 || triple.getArch() == llvm::Triple::x86_64) -{ -if (strcmp (flavor, "intel") == 0 || strcmp (flavor, "att") == 0) -return true; -else -return false; -} -else -return false; -} - - -Disassembler * -DisassemblerLLVMC::CreateInstance (const ArchSpec &arch, const char *flavor) -{ -if (arch.GetTriple().getArch() != llvm::Triple::UnknownArch) -{ -std::unique_ptr disasm_ap (new DisassemblerLLVMC(arch, flavor)); - -if (disasm_ap.get() && disasm_ap->IsValid()) -return disasm_ap.release(); -} -return NULL; -} - DisassemblerLLVMC::DisassemblerLLVMC (const ArchSpec &arch, const char *flavor_string) : Disassembler(arch, flavor_string), m_exe_ctx (NULL), @@ -782,8 +746,19 @@ DisassemblerLLVMC::DisassemblerLLVMC (co } } -DisassemblerLLVMC::~DisassemblerLLVMC() +DisassemblerLLVMC::~DisassemblerLLVMC() = default; + +Di
[Lldb-commits] [lldb] r251119 - Fix Clang-tidy modernize-use-override warnings in source/Plugins/ObjectContainer and ObjectFile; other minor fixes.
Author: eugenezelenko Date: Fri Oct 23 11:56:07 2015 New Revision: 251119 URL: http://llvm.org/viewvc/llvm-project?rev=251119&view=rev Log: Fix Clang-tidy modernize-use-override warnings in source/Plugins/ObjectContainer and ObjectFile; other minor fixes. Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h?rev=251119&r1=251118&r2=251119&view=diff == --- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h (original) +++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h Fri Oct 23 11:56:07 2015 @@ -10,8 +10,11 @@ #ifndef liblldb_ObjectContainerBSDArchive_h_ #define liblldb_ObjectContainerBSDArchive_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Symbol/ObjectContainer.h" - #include "lldb/Core/ArchSpec.h" #include "lldb/Core/ConstString.h" #include "lldb/Host/FileSpec.h" @@ -22,6 +25,14 @@ class ObjectContainerBSDArchive : public lldb_private::ObjectContainer { public: +ObjectContainerBSDArchive(const lldb::ModuleSP &module_sp, + lldb::DataBufferSP& data_sp, + lldb::offset_t data_offset, + const lldb_private::FileSpec *file, + lldb::offset_t offset, + lldb::offset_t length); + +~ObjectContainerBSDArchive() override; //-- // Static Functions @@ -60,43 +71,33 @@ public: //-- // Member Functions //-- -ObjectContainerBSDArchive (const lldb::ModuleSP &module_sp, - lldb::DataBufferSP& data_sp, - lldb::offset_t data_offset, - const lldb_private::FileSpec *file, - lldb::offset_t offset, - lldb::offset_t length); - -virtual -~ObjectContainerBSDArchive(); +bool +ParseHeader() override; -virtual bool -ParseHeader (); - -virtual size_t -GetNumObjects () const +size_t +GetNumObjects() const override { if (m_archive_sp) return m_archive_sp->GetNumObjects(); return 0; } -virtual void -Dump (lldb_private::Stream *s) const; -virtual lldb::ObjectFileSP -GetObjectFile (const lldb_private::FileSpec *file); +void +Dump(lldb_private::Stream *s) const override; + +lldb::ObjectFileSP +GetObjectFile(const lldb_private::FileSpec *file) override; //-- // PluginInterface protocol //-- -virtual lldb_private::ConstString -GetPluginName(); +lldb_private::ConstString +GetPluginName() override; -virtual uint32_t -GetPluginVersion(); +uint32_t +GetPluginVersion() override; protected: - struct Object { Object(); @@ -127,6 +128,13 @@ protected: typedef std::shared_ptr shared_ptr; typedef std::multimap Map; +Archive(const lldb_private::ArchSpec &arch, +const lldb_private::TimeValue &mod_time, +lldb::offset_t file_offset, +lldb_private::DataExtractor &data); + +~Archive(); + static Map & GetArchiveCache (); @@ -146,13 +154,6 @@ protected: lldb::offset_t file_offset, lldb_private::DataExtractor &data); -Archive (const lldb_private::ArchSpec &arch, - const lldb_private::TimeValue &mod_time, - lldb::offset_t file_offset, - lldb_private::DataExtractor &data); - -~Archive (); - size_t GetNumObjects () const { @@ -226,4 +227,4 @@ protected: Archive::shared_ptr m_archive_sp; }; -#endif // liblldb_ObjectContainerBSDArchive_h_ +#endif // liblldb_ObjectContainer
[Lldb-commits] [lldb] r251134 - Fix Clang-tidy modernize-use-override warnings in source/Target; other minor fixes.
Author: eugenezelenko Date: Fri Oct 23 13:39:37 2015 New Revision: 251134 URL: http://llvm.org/viewvc/llvm-project?rev=251134&view=rev Log: Fix Clang-tidy modernize-use-override warnings in source/Target; other minor fixes. Modified: lldb/trunk/source/Target/LanguageRuntime.cpp lldb/trunk/source/Target/Process.cpp lldb/trunk/source/Target/StopInfo.cpp lldb/trunk/source/Target/Target.cpp lldb/trunk/source/Target/Thread.cpp Modified: lldb/trunk/source/Target/LanguageRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=251134&r1=251133&r2=251134&view=diff == --- lldb/trunk/source/Target/LanguageRuntime.cpp (original) +++ lldb/trunk/source/Target/LanguageRuntime.cpp Fri Oct 23 13:39:37 2015 @@ -1,4 +1,4 @@ -//===-- LanguageRuntime.cpp -*- C++ -*-===// +//===-- LanguageRuntime.cpp -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,10 @@ // //===--===// +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Target/LanguageRuntime.h" #include "lldb/Target/ObjCLanguageRuntime.h" #include "lldb/Target/Target.h" @@ -17,7 +21,6 @@ using namespace lldb; using namespace lldb_private; - class ExceptionSearchFilter : public SearchFilter { public: @@ -33,8 +36,7 @@ public: UpdateModuleListIfNeeded (); } -virtual -~ExceptionSearchFilter() {} +~ExceptionSearchFilter() override = default; bool ModulePasses (const lldb::ModuleSP &module_sp) override @@ -52,7 +54,6 @@ public: if (m_filter_sp) return m_filter_sp->ModulePasses (spec); return false; - } void @@ -133,11 +134,8 @@ public: { } -virtual -~ExceptionBreakpointResolver() -{ -} - +~ExceptionBreakpointResolver() override = default; + Searcher::CallbackReturn SearchCallback (SearchFilter &filter, SymbolContext &context, @@ -187,6 +185,7 @@ public: static inline bool classof(const BreakpointResolver *V) { return V->getResolverID() == BreakpointResolver::ExceptionResolver; } + protected: BreakpointResolverSP CopyForBreakpoint (Breakpoint &breakpoint) override @@ -244,7 +243,6 @@ protected: bool m_throw_bp; }; - LanguageRuntime* LanguageRuntime::FindPlugin (Process *process, lldb::LanguageType language) { @@ -264,20 +262,12 @@ LanguageRuntime::FindPlugin (Process *pr return NULL; } -//-- -// Constructor -//-- LanguageRuntime::LanguageRuntime(Process *process) : m_process (process) { } -//-- -// Destructor -//-- -LanguageRuntime::~LanguageRuntime() -{ -} +LanguageRuntime::~LanguageRuntime() = default; Breakpoint::BreakpointPreconditionSP LanguageRuntime::CreateExceptionPrecondition (lldb::LanguageType language, Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=251134&r1=251133&r2=251134&view=diff == --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Fri Oct 23 13:39:37 2015 @@ -7,6 +7,10 @@ // //===--===// +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Target/Process.h" #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Breakpoint/BreakpointLocation.h" @@ -58,7 +62,6 @@ using namespace lldb; using namespace lldb_private; - // Comment out line below to disable memory caching, overriding the process setting // target.process.disable-memory-cache #define ENABLE_MEMORY_CACHING @@ -85,8 +88,8 @@ public: { } -virtual const Property * -GetPropertyAtIndex (const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const +const Property * +GetPropertyAtIndex(const ExecutionContext *exe_ctx, bool will_modify, uint32_t idx) const override { // When getting the value for a key from the process options, we will always // try and grab the setting from the current process if there is one. Else we just @@ -154,9 +157,7 @@ ProcessProperties::ProcessProperties (ll } } -ProcessProperties::~ProcessProperties() -{ -} +ProcessProperties::~ProcessProperties() = default;
[Lldb-commits] [PATCH] D14025: [LLDB] Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Interpreter; other minor fixes.
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: labath, clayborg. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. This is new Clang-tidy check which I run through LLDB code base, so I think will be good idea to review at least one set of changes before applying check to other places. I checked this patch on my own build on RHEL 6. Repository: rL LLVM http://reviews.llvm.org/D14025 Files: include/lldb/Interpreter/CommandInterpreter.h include/lldb/Interpreter/CommandObject.h include/lldb/Interpreter/CommandObjectMultiword.h include/lldb/Interpreter/CommandReturnObject.h include/lldb/Interpreter/OptionGroupArchitecture.h include/lldb/Interpreter/OptionValue.h include/lldb/Interpreter/OptionValueProperties.h include/lldb/Interpreter/OptionValueRegex.h include/lldb/Interpreter/OptionValueString.h include/lldb/Interpreter/Options.h include/lldb/Interpreter/ScriptInterpreter.h Index: include/lldb/Interpreter/ScriptInterpreter.h === --- include/lldb/Interpreter/ScriptInterpreter.h +++ include/lldb/Interpreter/ScriptInterpreter.h @@ -173,13 +173,13 @@ } virtual bool -GenerateTypeScriptFunction (const char* oneliner, std::string& output, const void* name_token = NULL) +GenerateTypeScriptFunction(const char* oneliner, std::string& output, const void* name_token = nullptr) { return false; } virtual bool -GenerateTypeScriptFunction (StringList &input, std::string& output, const void* name_token = NULL) +GenerateTypeScriptFunction(StringList &input, std::string& output, const void* name_token = nullptr) { return false; } @@ -191,13 +191,13 @@ } virtual bool -GenerateTypeSynthClass (StringList &input, std::string& output, const void* name_token = NULL) +GenerateTypeSynthClass(StringList &input, std::string& output, const void* name_token = nullptr) { return false; } virtual bool -GenerateTypeSynthClass (const char* oneliner, std::string& output, const void* name_token = NULL) +GenerateTypeSynthClass(const char* oneliner, std::string& output, const void* name_token = nullptr) { return false; } Index: include/lldb/Interpreter/OptionGroupArchitecture.h === --- include/lldb/Interpreter/OptionGroupArchitecture.h +++ include/lldb/Interpreter/OptionGroupArchitecture.h @@ -26,7 +26,6 @@ class OptionGroupArchitecture : public OptionGroup { public: - OptionGroupArchitecture (); ~OptionGroupArchitecture() override; @@ -55,15 +54,12 @@ } const char * -GetArchitectureName () +GetArchitectureName() { -if (m_arch_str.empty()) -return NULL; -return m_arch_str.c_str(); +return (m_arch_str.empty() ? nullptr : m_arch_str.c_str()); } protected: - std::string m_arch_str; // Save the arch triple in case a platform is specified after the architecture }; Index: include/lldb/Interpreter/OptionValueProperties.h === --- include/lldb/Interpreter/OptionValueProperties.h +++ include/lldb/Interpreter/OptionValueProperties.h @@ -1,4 +1,4 @@ -//===-- OptionValueProperties.h --*- C++ -*-===// +//===-- OptionValueProperties.h -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,6 +12,8 @@ // C Includes // C++ Includes +#include + // Other libraries and framework includes // Project includes #include "lldb/Core/ConstString.h" @@ -27,10 +29,6 @@ public std::enable_shared_from_this { public: - -//- -// OptionValueProperties -//- OptionValueProperties () : OptionValue(), m_name (), @@ -42,11 +40,9 @@ OptionValueProperties (const ConstString &name); OptionValueProperties (const OptionValueProperties &global_properties); - -~OptionValueProperties() override -{ -} - + +~OptionValueProperties() override = default; + Type GetType() const override { @@ -256,21 +252,16 @@ void *baton); protected: - Property * -ProtectedGetPropertyAtIndex (uint32_t idx) +ProtectedGetPropertyAtIndex(uint32_t idx) { -if (idx < m_properties.size()) -return &m_properties[idx]; -return NULL; +return ((idx < m_properties.size()) ? &m_properties[idx] : nullptr); } const Property * -ProtectedGetPropertyAtIndex (uint32_t idx) const +ProtectedGetPropertyAtIndex(uint32_t idx) const { -
[Lldb-commits] [lldb] r251162 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Interpreter; other minor fixes.
Author: eugenezelenko Date: Fri Oct 23 19:20:14 2015 New Revision: 251162 URL: http://llvm.org/viewvc/llvm-project?rev=251162&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Interpreter; other minor fixes. Differential Revision: http://reviews.llvm.org/D14025 Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h lldb/trunk/include/lldb/Interpreter/CommandObject.h lldb/trunk/include/lldb/Interpreter/CommandObjectMultiword.h lldb/trunk/include/lldb/Interpreter/CommandReturnObject.h lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h lldb/trunk/include/lldb/Interpreter/OptionValue.h lldb/trunk/include/lldb/Interpreter/OptionValueProperties.h lldb/trunk/include/lldb/Interpreter/OptionValueRegex.h lldb/trunk/include/lldb/Interpreter/OptionValueString.h lldb/trunk/include/lldb/Interpreter/Options.h lldb/trunk/include/lldb/Interpreter/ScriptInterpreter.h Modified: lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h?rev=251162&r1=251161&r2=251162&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandInterpreter.h Fri Oct 23 19:20:14 2015 @@ -265,8 +265,8 @@ public: bool include_aliases); CommandObject * -GetCommandObject (const char *cmd, - StringList *matches = NULL); +GetCommandObject(const char *cmd, + StringList *matches = nullptr); bool CommandExists (const char *cmd); @@ -322,12 +322,12 @@ public: CommandReturnObject &result); bool -HandleCommand (const char *command_line, - LazyBool add_to_history, - CommandReturnObject &result, - ExecutionContext *override_context = NULL, - bool repeat_on_empty_command = true, - bool no_context_switching = false); +HandleCommand(const char *command_line, + LazyBool add_to_history, + CommandReturnObject &result, + ExecutionContext *override_context = nullptr, + bool repeat_on_empty_command = true, + bool no_context_switching = false); //-- /// Execute a list of commands in sequence. @@ -335,7 +335,7 @@ public: /// @param[in] commands ///The list of commands to execute. /// @param[in,out] context -///The execution context in which to run the commands. Can be NULL in which case the default +///The execution context in which to run the commands. Can be nullptr in which case the default ///context will be used. /// @param[in] options ///This object holds the options used to control when to stop, whether to execute commands, @@ -356,7 +356,7 @@ public: /// @param[in] file ///The file from which to read in commands. /// @param[in,out] context -///The execution context in which to run the commands. Can be NULL in which case the default +///The execution context in which to run the commands. Can be nullptr in which case the default ///context will be used. /// @param[in] options ///This object holds the options used to control when to stop, whether to execute commands, @@ -643,7 +643,7 @@ public: } lldb::IOHandlerSP -GetIOHandler(bool force_create = false, CommandInterpreterRunOptions *options = NULL); +GetIOHandler(bool force_create = false, CommandInterpreterRunOptions *options = nullptr); bool GetStoppedForCrash () const @@ -682,7 +682,7 @@ protected: SetSynchronous (bool value); lldb::CommandObjectSP -GetCommandSP (const char *cmd, bool include_aliases = true, bool exact = true, StringList *matches = NULL); +GetCommandSP(const char *cmd, bool include_aliases = true, bool exact = true, StringList *matches = nullptr); private: Error Modified: lldb/trunk/include/lldb/Interpreter/CommandObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/CommandObject.h?rev=251162&r1=251161&r2=251162&view=diff == --- lldb/trunk/include/lldb/Interpreter/CommandObject.h (original) +++ lldb/trunk/include/lldb/Interpreter/CommandObject.h Fri Oct 23 19:20:14 2015 @@ -46,7 +46,7 @@ public: explicit operator bool() const { -return (help_callback != NULL); +return (help_callback != nullptr); } }; @@ -77,11 +77,11 @@ public: typedef std::map CommandMap; -CommandObject (CommandInterpreter &
[Lldb-commits] [lldb] r251167 - Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Author: eugenezelenko Date: Fri Oct 23 20:08:35 2015 New Revision: 251167 URL: http://llvm.org/viewvc/llvm-project?rev=251167&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes. Modified: lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.h lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.h lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h lldb/trunk/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h Modified: lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h?rev=251167&r1=251166&r2=251167&view=diff == --- lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h (original) +++ lldb/trunk/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h Fri Oct 23 20:08:35 2015 @@ -1,4 +1,4 @@ -//===-- MemoryHistoryASan.h *- C++ -*-===// +//===-- MemoryHistoryASan.h -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -24,7 +24,8 @@ namespace lldb_private { class MemoryHistoryASan : public lldb_private::MemoryHistory { public: - +~MemoryHistoryASan() override = default; + static lldb::MemoryHistorySP CreateInstance (const lldb::ProcessSP &process_sp); @@ -36,27 +37,28 @@ public: static lldb_private::ConstString GetPluginNameStatic(); + +lldb_private::ConstString +GetPluginName() override +{ +return GetPluginNameStatic(); +} + +uint32_t +GetPluginVersion() override +{ +return 1; +} -virtual -~MemoryHistoryASan () {} - -virtual lldb_private::ConstString -GetPluginName() { return GetPluginNameStatic(); } - -virtual uint32_t -GetPluginVersion() { return 1; } - -virtual lldb_private::HistoryThreads -GetHistoryThreads(lldb::addr_t address); +lldb_private::HistoryThreads +GetHistoryThreads(lldb::addr_t address) override; private: - MemoryHistoryASan(const lldb::ProcessSP &process_sp); lldb::ProcessWP m_process_wp; - }; } // namespace lldb_private -#endif // liblldb_MemoryHistoryASan_h_ +#endif // liblldb_MemoryHistoryASan_h_ Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h?rev=251167&r1=251166&r2=251167&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h Fri Oct 23 20:08:35 2015 @@ -12,9 +12,9 @@ // C Includes // C++ Includes -#include #include #include +#include // Other libraries and framework includes // Project includes @@ -94,14 +94,10 @@ public: uint32_t m_saved_timeout; }; -//-- -// Constructors and Destructors -//-- GDBRemoteCommunication(const char *comm_name, const char *listener_name); -virtual -~GDBRemoteCommunication(); +~GDBRemoteCommunication() override; PacketResult GetAck (); @@ -117,12 +113,13 @@ public: size_t payload_length); bool -GetSequenceMutex (Mutex::Locker& locker, const char *failure_message = NULL); +GetSequenceMutex(Mutex::Locker& locker, const char *failure_message = nullptr); PacketType CheckForPacket (const uint8_t *src, size_t src_len, StringExtractorGDBRemote &packet); + bool IsRunning() const { @@ -162,21 +159,21 @@ public: { return m_packet_timeout * TimeValue::MicroSecPerSec; } + //-- // Start a debugserver instance on the current host using the // supplied connection
[Lldb-commits] [lldb] r251170 - Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to fix MSVC builds failures.
Author: eugenezelenko Date: Fri Oct 23 20:28:05 2015 New Revision: 251170 URL: http://llvm.org/viewvc/llvm-project?rev=251170&view=rev Log: Revert r251167 in source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp to fix MSVC builds failures. Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=251170&r1=251169&r2=251170&view=diff == --- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original) +++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Fri Oct 23 20:28:05 2015 @@ -7,6 +7,8 @@ // //===--===// +#include "lldb/Host/Config.h" + // C Includes #include #include @@ -23,9 +25,6 @@ #include #include -// Other libraries and framework includes -// Project includes -#include "lldb/Host/Config.h" #include "lldb/Breakpoint/Watchpoint.h" #include "lldb/Interpreter/Args.h" #include "lldb/Core/ArchSpec.h" @@ -66,6 +65,7 @@ #include "lldb/Target/SystemRuntime.h" #include "lldb/Utility/PseudoTerminal.h" +// Project includes #include "lldb/Host/Host.h" #include "Plugins/Process/Utility/GDBRemoteSignals.h" #include "Plugins/Process/Utility/InferiorCallPOSIX.h" @@ -78,7 +78,6 @@ #include "ThreadGDBRemote.h" #define DEBUGSERVER_BASENAME"debugserver" - using namespace lldb; using namespace lldb_private; using namespace lldb_private::process_gdb_remote; @@ -99,7 +98,7 @@ namespace lldb if (error.Success()) ((ProcessGDBRemote *)p)->GetGDBRemote().DumpHistory (strm); } -} // namespace lldb +} namespace { @@ -120,6 +119,7 @@ namespace { class PluginProperties : public Properties { public: + static ConstString GetSettingName () { @@ -132,9 +132,12 @@ namespace { m_collection_sp.reset (new OptionValueProperties(GetSettingName())); m_collection_sp->Initialize(g_properties); } - -~PluginProperties() override = default; - + +virtual +~PluginProperties() +{ +} + uint64_t GetPacketTimeout() { @@ -168,14 +171,16 @@ namespace { return g_settings_sp; } -} // anonymous namespace +} // anonymous namespace end class ProcessGDBRemote::GDBLoadedModuleInfoList { public: + class LoadedModuleInfo { public: + enum e_data_point { e_has_name = 0, @@ -196,7 +201,6 @@ public: m_name = name; m_has[e_has_name] = true; } - bool get_name (std::string & out) const { out = m_name; @@ -208,7 +212,6 @@ public: m_base = base; m_has[e_has_base] = true; } - bool get_base (lldb::addr_t & out) const { out = m_base; @@ -219,7 +222,6 @@ public: { m_base_is_offset = is_offset; } - bool get_base_is_offset(bool & out) const { out = m_base_is_offset; @@ -231,7 +233,6 @@ public: m_link_map = addr; m_has[e_has_link_map] = true; } - bool get_link_map (lldb::addr_t & out) const { out = m_link_map; @@ -243,7 +244,6 @@ public: m_dynamic = addr; m_has[e_has_dynamic] = true; } - bool get_dynamic (lldb::addr_t & out) const { out = m_dynamic; @@ -257,6 +257,7 @@ public: } protected: + bool m_has[e_num]; std::string m_name; lldb::addr_t m_link_map; @@ -332,6 +333,7 @@ ProcessGDBRemote::Terminate() PluginManager::UnregisterPlugin (ProcessGDBRemote::CreateInstance); } + lldb::ProcessSP ProcessGDBRemote::CreateInstance (lldb::TargetSP target_sp, Listener &listener, const FileSpec *crash_file_path) { @@ -374,6 +376,9 @@ ProcessGDBRemote::CanDebug (lldb::Target return true; } +//-- +// ProcessGDBRemote constructor +//-- ProcessGDBRemote::ProcessGDBRemote(lldb::TargetSP target_sp, Listener &listener) : Process (target_sp, listener), m_flags (0), @@ -428,6 +433,9 @@ ProcessGDBRemote::ProcessGDBRemote(lldb: m_gdb_comm.SetPacketTimeout(timeout_seconds); } +//-- +// Destructor +//-- ProcessGDBRemote::~ProcessGDBRemote() { // m_mach_process.UnregisterNotificationCallbacks (this); @@ -555,6 +563,7 @@ SplitCo
[Lldb-commits] [lldb] r251309 - Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes.
Author: eugenezelenko Date: Mon Oct 26 12:00:13 2015 New Revision: 251309 URL: http://llvm.org/viewvc/llvm-project?rev=251309&view=rev Log: Fix Clang-tidy modernize-use-override warnings in some files in source; other minor fixes. Modified: lldb/trunk/source/Core/IOHandler.cpp lldb/trunk/source/Core/ValueObjectSyntheticFilter.cpp lldb/trunk/source/DataFormatters/VectorType.cpp lldb/trunk/source/Expression/Materializer.cpp lldb/trunk/source/Interpreter/CommandObjectScript.h Modified: lldb/trunk/source/Core/IOHandler.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/IOHandler.cpp?rev=251309&r1=251308&r2=251309&view=diff == --- lldb/trunk/source/Core/IOHandler.cpp (original) +++ lldb/trunk/source/Core/IOHandler.cpp Mon Oct 26 12:00:13 2015 @@ -7,9 +7,17 @@ // //===--===// +// C Includes +#ifndef LLDB_DISABLE_CURSES +#include +#include +#endif +// C++ Includes #include +// Other libraries and framework includes +// Project includes #include "lldb/Breakpoint/BreakpointLocation.h" #include "lldb/Core/IOHandler.h" #include "lldb/Core/Debugger.h" @@ -28,11 +36,6 @@ #include "lldb/Target/RegisterContext.h" #include "lldb/Target/ThreadPlan.h" -#ifndef LLDB_DISABLE_CURSES -#include -#include -#endif - using namespace lldb; using namespace lldb_private; @@ -46,7 +49,6 @@ IOHandler::IOHandler (Debugger &debugger { } - IOHandler::IOHandler (Debugger &debugger, IOHandler::Type type, const lldb::StreamFileSP &input_sp, @@ -71,10 +73,7 @@ IOHandler::IOHandler (Debugger &debugger m_error_sp); } -IOHandler::~IOHandler() -{ -} - +IOHandler::~IOHandler() = default; int IOHandler::GetInputFD() @@ -136,7 +135,6 @@ IOHandler::GetOutputStreamFile() return m_output_sp; } - StreamFileSP & IOHandler::GetErrorStreamFile() { @@ -204,10 +202,7 @@ IOHandlerConfirm::IOHandlerConfirm (Debu } - -IOHandlerConfirm::~IOHandlerConfirm () -{ -} +IOHandlerConfirm::~IOHandlerConfirm() = default; int IOHandlerConfirm::IOHandlerComplete (IOHandler &io_handler, @@ -334,11 +329,9 @@ IOHandlerDelegate::IOHandlerComplete (IO break; } - return 0; } - IOHandlerEditline::IOHandlerEditline (Debugger &debugger, IOHandler::Type type, const char *editline_name, // Used for saving history files @@ -444,7 +437,6 @@ IOHandlerEditline::Deactivate () m_delegate.IOHandlerDeactivated(*this); } - bool IOHandlerEditline::GetLine (std::string &line, bool &interrupted) { @@ -619,7 +611,6 @@ IOHandlerEditline::GetContinuationPrompt return m_continuation_prompt.c_str(); } - void IOHandlerEditline::SetContinuationPrompt (const char *p) { @@ -634,7 +625,6 @@ IOHandlerEditline::SetContinuationPrompt #endif } - void IOHandlerEditline::SetBaseLineNumber (uint32_t line) { @@ -824,6 +814,7 @@ type summary add -s "x=${var.x}, y=${var type summary add -s "w=${var.width}, h=${var.height}" curses::Size type summary add -s "${var.origin%S} ${var.size%S}" curses::Rect #endif + struct Point { int x; @@ -855,13 +846,13 @@ type summary add -s "${var.origin%S} ${v { printf ("(x=%i, y=%i)\n", x, y); } - }; bool operator == (const Point &lhs, const Point &rhs) { return lhs.x == rhs.x && lhs.y == rhs.y; } + bool operator != (const Point &lhs, const Point &rhs) { return lhs.x != rhs.x || lhs.y != rhs.y; @@ -889,13 +880,13 @@ type summary add -s "${var.origin%S} ${v { printf ("(w=%i, h=%i)\n", width, height); } - }; bool operator == (const Size &lhs, const Size &rhs) { return lhs.width == rhs.width && lhs.height == rhs.height; } + bool operator != (const Size &lhs, const Size &rhs) { return lhs.width != rhs.width || lhs.height != rhs.height; @@ -942,6 +933,7 @@ type summary add -s "${var.origin%S} ${v size.height -= h*2; origin.y += h; } + // Return a status bar rectangle which is the last line of // this rectangle. This rectangle will be modified to not // include the status bar area. @@ -1011,7 +1003,6 @@ type summary add -s "${var.origin%S} ${v VerticalSplit (left_width, left, right); } - void VerticalSplit (int left_width, Rect &left, Rect &right) const { @@ -1035,6 +1026,7 @@ type summary add -s "${var.origin%S} ${v { return lhs.origin == rhs.origin && lhs.size == rhs.size; } + bool operator != (const Rect &lhs, const Rect &rhs) { return lhs.origin != rhs.origin || lhs.si
[Lldb-commits] [lldb] r251374 - Fix Clang-tidy modernize-use-override warnings in source/Plugins/LanguageRuntime and Platform; other minor fixes.
Author: eugenezelenko Date: Mon Oct 26 19:45:06 2015 New Revision: 251374 URL: http://llvm.org/viewvc/llvm-project?rev=251374&view=rev Log: Fix Clang-tidy modernize-use-override warnings in source/Plugins/LanguageRuntime and Platform; other minor fixes. Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h lldb/trunk/source/Plugins/Platform/Android/PlatformAndroid.h lldb/trunk/source/Plugins/Platform/Android/PlatformAndroidRemoteGDBServer.h lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.h lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.h lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformiOSSimulator.h lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.h lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.h lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.h Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp?rev=251374&r1=251373&r2=251374&view=diff == --- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp (original) +++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp Mon Oct 26 19:45:06 2015 @@ -7,6 +7,10 @@ // //===--===// +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "RenderScriptRuntime.h" #include "lldb/Core/ConstString.h" @@ -43,7 +47,7 @@ namespace { template class empirical_type { - public: +public: // Ctor. Contents is invalid when constructed. empirical_type() : valid(false) @@ -97,17 +101,17 @@ class empirical_type return data; } - protected: +protected: bool valid; type_t data; }; -} // namespace {} +} // anonymous namespace // The ScriptDetails class collects data associated with a single script instance. struct RenderScriptRuntime::ScriptDetails { -~ScriptDetails() {}; +~ScriptDetails() = default; enum ScriptType { @@ -226,7 +230,6 @@ struct RenderScriptRuntime::AllocationDe AllocationDetails(): id(ID++) { } - }; unsigned int RenderScriptRuntime::AllocationDetails::ID = 1; @@ -401,7 +404,6 @@ RenderScriptRuntime::IsRenderScriptModul return GetModuleKind(module_sp) != eModuleKindIgnored; } - void RenderScriptRuntime::ModulesDidLoad(const ModuleList &module_list ) { @@ -418,7 +420,6 @@ RenderScriptRuntime::ModulesDidLoad(cons } } - //-- // PluginInterface protocol //-- @@ -468,7 +469,6 @@ RenderScriptRuntime::CreateExceptionReso return resolver_sp; } - const RenderScriptRuntime::HookDefn RenderScriptRuntime::s_runtimeHookDefns[] = { //rsdScript @@ -531,8 +531,8 @@ const RenderScriptRuntime::HookDefn Rend nullptr // handler }, }; -const size_t RenderScriptRuntime::s_runtimeHookCount = sizeof(s_runtimeHookDefns)/sizeof(s_runtimeHookDefns[0]); +const size_t RenderScriptRuntime::s_runtimeHookCount = sizeof(s_runtimeHookDefns)/sizeof(s_runtimeHookDefns[0]); bool RenderScriptRuntime::HookCallback(void *baton, StoppointCallbackContext *ctx, lldb::user_id_t break_id, lldb::user_id_t break_loc_id) @@ -547,7 +547,6 @@ RenderScriptRuntime::HookCallback(void * return false; } - void RenderScriptRuntime::HookCallback(RuntimeHook* hook_info, ExecutionContext& context) { @@ -562,7 +561,6 @@ RenderScriptRuntime::HookCallback(Runtim } } - bool RenderScriptRuntime::GetArgSimple(ExecutionContext &context, uint32_t arg, uint64_t *data) { @@ -714,7 +712,6 @@ RenderScriptRuntime::GetArgSimple(Execut } } - return success; } @@ -868,7 +865,6 @@ RenderScriptRuntime::CaptureScriptInit1( { log->Printf ("RenderScriptRuntime::CaptureScriptInit1 - resource name invalid, Script not tagged"); } - } void @@ -1810,7 +1806,6 @@ RenderScriptRuntime::Update() } } - // The maximum line length of an .rs.info packet #define MAXLINE 500 @@ -2453,8 +2448,6
[Lldb-commits] [lldb] r251416 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/DataFormatters, Breakpoint and Utility; other minor fixes.
Author: eugenezelenko Date: Tue Oct 27 12:20:33 2015 New Revision: 251416 URL: http://llvm.org/viewvc/llvm-project?rev=251416&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/DataFormatters, Breakpoint and Utility; other minor fixes. Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h lldb/trunk/include/lldb/Breakpoint/BreakpointLocation.h lldb/trunk/include/lldb/Breakpoint/BreakpointLocationList.h lldb/trunk/include/lldb/Breakpoint/BreakpointOptions.h lldb/trunk/include/lldb/Breakpoint/Watchpoint.h lldb/trunk/include/lldb/Breakpoint/WatchpointOptions.h lldb/trunk/include/lldb/DataFormatters/DataVisualization.h lldb/trunk/include/lldb/DataFormatters/DumpValueObjectOptions.h lldb/trunk/include/lldb/DataFormatters/FormatClasses.h lldb/trunk/include/lldb/DataFormatters/FormatManager.h lldb/trunk/include/lldb/DataFormatters/FormattersContainer.h lldb/trunk/include/lldb/DataFormatters/StringPrinter.h lldb/trunk/include/lldb/DataFormatters/TypeCategory.h lldb/trunk/include/lldb/DataFormatters/TypeCategoryMap.h lldb/trunk/include/lldb/DataFormatters/TypeSummary.h lldb/trunk/include/lldb/DataFormatters/TypeSynthetic.h lldb/trunk/include/lldb/Utility/Iterable.h lldb/trunk/include/lldb/Utility/SharingPtr.h Modified: lldb/trunk/include/lldb/Breakpoint/Breakpoint.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Breakpoint/Breakpoint.h?rev=251416&r1=251415&r2=251416&view=diff == --- lldb/trunk/include/lldb/Breakpoint/Breakpoint.h (original) +++ lldb/trunk/include/lldb/Breakpoint/Breakpoint.h Tue Oct 27 12:20:33 2015 @@ -12,7 +12,10 @@ // C Includes // C++ Includes +#include +#include #include +#include // Other libraries and framework includes // Project includes @@ -81,7 +84,6 @@ class Breakpoint: public Stoppoint { public: - static const ConstString & GetEventIdentifier (); @@ -142,7 +144,6 @@ public: GetEventDataFromEvent (const Event *event_sp); private: - lldb::BreakpointEventType m_breakpoint_event; lldb::BreakpointSP m_new_breakpoint_sp; BreakpointLocationCollection m_locations; @@ -153,7 +154,7 @@ public: class BreakpointPrecondition { public: -virtual ~BreakpointPrecondition() {} +virtual ~BreakpointPrecondition() = default; virtual bool EvaluatePrecondition(StoppointCallbackContext &context); @@ -287,8 +288,8 @@ public: ///Returns a pointer to the new location. //-- lldb::BreakpointLocationSP -AddLocation (const Address &addr, - bool *new_location = NULL); +AddLocation(const Address &addr, +bool *new_location = nullptr); //-- /// Find a breakpoint location by Address. @@ -297,7 +298,7 @@ public: ///The Address specifying the location. /// @return ///Returns a shared pointer to the location at \a addr. The pointer -///in the shared pointer will be NULL if there is no location at that address. +///in the shared pointer will be nullptr if there is no location at that address. //-- lldb::BreakpointLocationSP FindLocationByAddress (const Address &addr); @@ -321,7 +322,7 @@ public: ///The ID specifying the location. /// @return ///Returns a shared pointer to the location with ID \a bp_loc_id. The pointer -///in the shared pointer will be NULL if there is no location with that ID. +///in the shared pointer will be nullptr if there is no location with that ID. //-- lldb::BreakpointLocationSP FindLocationByID (lldb::break_id_t bp_loc_id); @@ -334,7 +335,7 @@ public: /// /// @return /// Returns a shared pointer to the location with index \a -/// index. The shared pointer might contain NULL if \a index is +/// index. The shared pointer might contain nullptr if \a index is /// greater than then number of actual locations. //-- lldb::BreakpointLocationSP @@ -482,7 +483,7 @@ public: /// /// @param[in] condition ///The condition expression to evaluate when the breakpoint is hit. -///Pass in NULL to clear the condition. +///Pass in nullptr to clear the condition. //-- void SetCondition (const char *condition); @@ -490,7 +491,7 @@ public: /// Return a pointer to the text of the condition expression. /// /// @return -///
[Lldb-commits] [lldb] r251470 - Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Core; other minor fixes.
Author: eugenezelenko Date: Tue Oct 27 19:18:41 2015 New Revision: 251470 URL: http://llvm.org/viewvc/llvm-project?rev=251470&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Core; other minor fixes. Modified: lldb/trunk/include/lldb/Core/Address.h lldb/trunk/include/lldb/Core/AddressRange.h lldb/trunk/include/lldb/Core/Broadcaster.h lldb/trunk/include/lldb/Core/Communication.h lldb/trunk/include/lldb/Core/ConstString.h lldb/trunk/include/lldb/Core/DataExtractor.h lldb/trunk/include/lldb/Core/Debugger.h lldb/trunk/include/lldb/Core/Event.h lldb/trunk/include/lldb/Core/FormatEntity.h lldb/trunk/include/lldb/Core/IOHandler.h lldb/trunk/include/lldb/Core/Listener.h lldb/trunk/include/lldb/Core/MappedHash.h lldb/trunk/include/lldb/Core/Module.h lldb/trunk/include/lldb/Core/ModuleList.h Modified: lldb/trunk/include/lldb/Core/Address.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Address.h?rev=251470&r1=251469&r2=251470&view=diff == --- lldb/trunk/include/lldb/Core/Address.h (original) +++ lldb/trunk/include/lldb/Core/Address.h Tue Oct 27 19:18:41 2015 @@ -13,6 +13,7 @@ // C Includes // C++ Includes #include + // Other libraries and framework includes // Project includes #include "lldb/lldb-private.h" @@ -108,7 +109,6 @@ public: { } - //-- /// Copy constructor /// @@ -176,6 +176,7 @@ public: const Address& operator= (const Address& rhs); #endif + //-- /// Clear the object's state. /// @@ -216,7 +217,7 @@ public: class ModulePointerAndOffsetLessThanFunctionObject { public: -ModulePointerAndOffsetLessThanFunctionObject () {} +ModulePointerAndOffsetLessThanFunctionObject() = default; bool operator() (const Address& a, const Address& b) const @@ -355,7 +356,7 @@ public: bool IsSectionOffset() const { -return IsValid() && (GetSection().get() != NULL); +return IsValid() && (GetSection().get() != nullptr); } //-- @@ -375,7 +376,6 @@ public: return m_offset != LLDB_INVALID_ADDRESS; } - //-- /// Get the memory cost of this object. /// @@ -508,6 +508,7 @@ public: { m_section_wp.reset(); } + //-- /// Reconstruct a symbol context from an address. /// @@ -567,10 +568,8 @@ protected: //-- bool SectionWasDeletedPrivate() const; - }; - //-- // NOTE: Be careful using this operator. It can correctly compare two // addresses from the same Module correctly. It can't compare two @@ -587,12 +586,9 @@ protected: //-- bool operator< (const Address& lhs, const Address& rhs); bool operator> (const Address& lhs, const Address& rhs); - - - bool operator== (const Address& lhs, const Address& rhs); bool operator!= (const Address& lhs, const Address& rhs); } // namespace lldb_private -#endif // liblldb_Address_h_ +#endif // liblldb_Address_h_ Modified: lldb/trunk/include/lldb/Core/AddressRange.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/AddressRange.h?rev=251470&r1=251469&r2=251470&view=diff == --- lldb/trunk/include/lldb/Core/AddressRange.h (original) +++ lldb/trunk/include/lldb/Core/AddressRange.h Tue Oct 27 19:18:41 2015 @@ -10,6 +10,10 @@ #ifndef liblldb_AddressRange_h_ #define liblldb_AddressRange_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/Address.h" namespace lldb_private { @@ -62,7 +66,7 @@ public: /// @param[in] section_list /// A list of sections, one of which may contain the \a vaddr. //-- -AddressRange (lldb::addr_t file_addr, lldb::addr_t byte_size, const SectionList *section_list = NULL); +AddressRange(lldb::addr_t file_addr, lldb::addr_t byte_size, const SectionList *section_list = nullptr); //-- /// Construct with a Address object address and byte size. @@ -281,4 +285,4 @@ protected: } // namespace lldb_private -#endif // liblldb_AddressRange_h_ +#endif // liblldb_AddressRange_h_ Modified: lldb/trunk/include/l
[Lldb-commits] [lldb] r251556 - Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Core; other minor fixes.
Author: eugenezelenko Date: Wed Oct 28 15:53:04 2015 New Revision: 251556 URL: http://llvm.org/viewvc/llvm-project?rev=251556&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Core; other minor fixes. Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h lldb/trunk/include/lldb/Core/Opcode.h lldb/trunk/include/lldb/Core/PluginManager.h lldb/trunk/include/lldb/Core/RangeMap.h lldb/trunk/include/lldb/Core/RegisterValue.h lldb/trunk/include/lldb/Core/RegularExpression.h Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleSpec.h?rev=251556&r1=251555&r2=251556&view=diff == --- lldb/trunk/include/lldb/Core/ModuleSpec.h (original) +++ lldb/trunk/include/lldb/Core/ModuleSpec.h Wed Oct 28 15:53:04 2015 @@ -10,6 +10,12 @@ #ifndef liblldb_ModuleSpec_h_ #define liblldb_ModuleSpec_h_ +// C Includes +// C++ Includes +#include + +// Other libraries and framework includes +// Project includes #include "lldb/Core/ArchSpec.h" #include "lldb/Core/Stream.h" #include "lldb/Core/UUID.h" @@ -100,17 +106,13 @@ public: FileSpec * GetFileSpecPtr () { -if (m_file) -return &m_file; -return NULL; +return (m_file ? &m_file : nullptr); } const FileSpec * GetFileSpecPtr () const { -if (m_file) -return &m_file; -return NULL; +return (m_file ? &m_file : nullptr); } FileSpec & @@ -118,6 +120,7 @@ public: { return m_file; } + const FileSpec & GetFileSpec () const { @@ -127,17 +130,13 @@ public: FileSpec * GetPlatformFileSpecPtr () { -if (m_platform_file) -return &m_platform_file; -return NULL; +return (m_platform_file ? &m_platform_file : nullptr); } const FileSpec * GetPlatformFileSpecPtr () const { -if (m_platform_file) -return &m_platform_file; -return NULL; +return (m_platform_file ? &m_platform_file : nullptr); } FileSpec & @@ -155,17 +154,13 @@ public: FileSpec * GetSymbolFileSpecPtr () { -if (m_symbol_file) -return &m_symbol_file; -return NULL; +return (m_symbol_file ? &m_symbol_file : nullptr); } const FileSpec * GetSymbolFileSpecPtr () const { -if (m_symbol_file) -return &m_symbol_file; -return NULL; +return (m_symbol_file ? &m_symbol_file : nullptr); } FileSpec & @@ -180,21 +175,16 @@ public: return m_symbol_file; } - ArchSpec * GetArchitecturePtr () { -if (m_arch.IsValid()) -return &m_arch; -return NULL; +return (m_arch.IsValid() ? &m_arch : nullptr); } const ArchSpec * GetArchitecturePtr () const { -if (m_arch.IsValid()) -return &m_arch; -return NULL; +return (m_arch.IsValid() ? &m_arch : nullptr); } ArchSpec & @@ -212,17 +202,13 @@ public: UUID * GetUUIDPtr () { -if (m_uuid.IsValid()) -return &m_uuid; -return NULL; +return (m_uuid.IsValid() ? &m_uuid : nullptr); } const UUID * GetUUIDPtr () const { -if (m_uuid.IsValid()) -return &m_uuid; -return NULL; +return (m_uuid.IsValid() ? &m_uuid : nullptr); } UUID & @@ -306,7 +292,6 @@ public: m_object_mod_time.Clear(); } - explicit operator bool () const { if (m_file) @@ -477,9 +462,7 @@ public: m_specs = rhs.m_specs; } -~ModuleSpecList () -{ -} +~ModuleSpecList() = default; ModuleSpecList & operator = (const ModuleSpecList &rhs) @@ -529,6 +512,7 @@ public: { return m_specs[i]; } + bool GetModuleSpecAtIndex (size_t i, ModuleSpec &module_spec) const { @@ -541,8 +525,7 @@ public: module_spec.Clear(); return false; } - - + bool FindMatchingModuleSpec (const ModuleSpec &module_spec, ModuleSpec &match_module_spec) const { @@ -621,4 +604,4 @@ protected: } // namespace lldb_private -#endif // liblldb_ModuleSpec_h_ +#endif // liblldb_ModuleSpec_h_ Modified: lldb/trunk/include/lldb/Core/Opcode.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Opcode.h?rev=251556&r1=251555&r2=251556&view=diff == --- lldb/trunk/include/lldb/Core/Opcode.h (original) +++ lldb/trunk/include/lldb/Core/Opcode.h Wed Oct 28 15:53:04 2015 @@ -16,6 +16,7 @@ // C++ Includes // Other libraries and framework includes #include "llvm/Support/MathExtras.h" + // Pr
[Lldb-commits] [lldb] r251561 - Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Core; other minor fixes.
Author: eugenezelenko Date: Wed Oct 28 17:11:25 2015 New Revision: 251561 URL: http://llvm.org/viewvc/llvm-project?rev=251561&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Core; other minor fixes. Modified: lldb/trunk/include/lldb/Core/STLUtils.h lldb/trunk/include/lldb/Core/SourceManager.h lldb/trunk/include/lldb/Core/Stream.h lldb/trunk/include/lldb/Core/StringList.h lldb/trunk/include/lldb/Core/StructuredData.h lldb/trunk/include/lldb/Core/Timer.h lldb/trunk/include/lldb/Core/UUID.h lldb/trunk/include/lldb/Core/UniqueCStringMap.h lldb/trunk/include/lldb/Core/Value.h lldb/trunk/include/lldb/Core/ValueObject.h lldb/trunk/include/lldb/Core/ValueObjectCast.h lldb/trunk/include/lldb/Core/ValueObjectConstResult.h lldb/trunk/include/lldb/Core/ValueObjectConstResultImpl.h lldb/trunk/include/lldb/Core/ValueObjectDynamicValue.h lldb/trunk/include/lldb/Core/ValueObjectSyntheticFilter.h Modified: lldb/trunk/include/lldb/Core/STLUtils.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/STLUtils.h?rev=251561&r1=251560&r2=251561&view=diff == --- lldb/trunk/include/lldb/Core/STLUtils.h (original) +++ lldb/trunk/include/lldb/Core/STLUtils.h Wed Oct 28 17:11:25 2015 @@ -9,14 +9,18 @@ #ifndef liblldb_STLUtils_h_ #define liblldb_STLUtils_h_ -#if defined(__cplusplus) +// C Includes #include +// C++ Includes #include #include #include +// Other libraries and framework includes +// Project includes + //-- // C string less than compare function object //-- @@ -28,7 +32,6 @@ struct CStringCompareFunctionObject } }; - //-- // C string equality function object (binary predicate). //-- @@ -40,7 +43,6 @@ struct CStringEqualBinaryPredicate } }; - //-- // Templated type for finding an entry in a std::map whose value // is equal to something @@ -48,21 +50,26 @@ struct CStringEqualBinaryPredicate template class ValueEquals { -private: -S second_value; - public: ValueEquals (const S& val) : second_value(val) {} + // Compare the second item bool operator() (std::pair elem) { return elem.second == second_value; } + +private: +S second_value; }; template -inline void PrintAllCollectionElements (std::ostream &s, const T& coll, const char* header_cstr=NULL, const char* separator_cstr=" ") +inline void +PrintAllCollectionElements(std::ostream &s, + const T& coll, + const char* header_cstr = nullptr, + const char* separator_cstr = " ") { typename T::const_iterator pos; @@ -88,7 +95,4 @@ struct for_each_cplusplus_delete typedef std::vector STLStringArray; typedef std::vector CStringArray; - - -#endif // #if defined(__cplusplus) -#endif // liblldb_STLUtils_h_ +#endif // liblldb_STLUtils_h_ Modified: lldb/trunk/include/lldb/Core/SourceManager.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SourceManager.h?rev=251561&r1=251560&r2=251561&view=diff == --- lldb/trunk/include/lldb/Core/SourceManager.h (original) +++ lldb/trunk/include/lldb/Core/SourceManager.h Wed Oct 28 17:11:25 2015 @@ -13,6 +13,7 @@ // C Includes // C++ Includes #include +#include #include // Other libraries and framework includes @@ -26,12 +27,11 @@ class SourceManager { public: #ifndef SWIG - class File { -friend bool operator== (const SourceManager::File &lhs, const SourceManager::File &rhs); +friend bool operator== (const SourceManager::File &lhs, const SourceManager::File &rhs); + public: - File (const FileSpec &file_spec, Target *target); ~File(); @@ -83,7 +83,6 @@ public: GetNumLines (); protected: - bool CalculateLineOffsets (uint32_t line = UINT32_MAX); @@ -95,20 +94,18 @@ public: typedef std::vector LineOffsets; LineOffsets m_offsets; }; - #endif // SWIG typedef std::shared_ptr FileSP; #ifndef SWIG - // The SourceFileCache class separates the source manager from the cache of source files, so the // cache can be stored in the Debugger, but the source managers can be per target. class SourceFileCache { public: -SourceFileCache () {} -~SourceFileCache() {} +SourceFileCache() = default; +~SourceFileCache() = default; void
[Lldb-commits] [lldb] r251587 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Expression and Host; other minor fixes.
Author: eugenezelenko Date: Wed Oct 28 19:27:24 2015 New Revision: 251587 URL: http://llvm.org/viewvc/llvm-project?rev=251587&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Expression and Host; other minor fixes. Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h lldb/trunk/include/lldb/Expression/FunctionCaller.h lldb/trunk/include/lldb/Expression/IRExecutionUnit.h lldb/trunk/include/lldb/Expression/Materializer.h lldb/trunk/include/lldb/Expression/UserExpression.h lldb/trunk/include/lldb/Expression/UtilityFunction.h lldb/trunk/include/lldb/Host/Condition.h lldb/trunk/include/lldb/Host/Debug.h lldb/trunk/include/lldb/Host/File.h lldb/trunk/include/lldb/Host/FileSpec.h lldb/trunk/include/lldb/Host/Mutex.h lldb/trunk/include/lldb/Host/Predicate.h lldb/trunk/include/lldb/Host/ProcessRunLock.h lldb/trunk/include/lldb/Host/XML.h Modified: lldb/trunk/include/lldb/Expression/ExpressionVariable.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionVariable.h?rev=251587&r1=251586&r2=251587&view=diff == --- lldb/trunk/include/lldb/Expression/ExpressionVariable.h (original) +++ lldb/trunk/include/lldb/Expression/ExpressionVariable.h Wed Oct 28 19:27:24 2015 @@ -10,7 +10,9 @@ #ifndef liblldb_ExpressionVariable_h_ #define liblldb_ExpressionVariable_h_ +// C Includes // C++ Includes +#include #include // Other libraries and framework includes @@ -44,7 +46,9 @@ public: m_kind(kind) { } - + +virtual ~ExpressionVariable(); + size_t GetByteSize () { @@ -110,18 +114,16 @@ public: void TransferAddress (bool force = false) { -if (m_live_sp.get() == NULL) +if (m_live_sp.get() == nullptr) return; -if (m_frozen_sp.get() == NULL) +if (m_frozen_sp.get() == nullptr) return; if (force || (m_frozen_sp->GetLiveAddress() == LLDB_INVALID_ADDRESS)) m_frozen_sp->SetLiveAddress(m_live_sp->GetLiveAddress()); } -virtual ~ExpressionVariable(); - enum Flags { EVNone = 0, @@ -207,7 +209,7 @@ public: /// The name of the requested variable. /// /// @return -/// The variable requested, or NULL if that variable is not in the list. +/// The variable requested, or nullptr if that variable is not in the list. //-- lldb::ExpressionVariableSP GetVariable (const ConstString &name) @@ -286,7 +288,9 @@ public: m_kind(kind) { } - + +virtual ~PersistentExpressionState(); + virtual lldb::ExpressionVariableSP CreatePersistentVariable (const lldb::ValueObjectSP &valobj_sp) = 0; @@ -297,8 +301,6 @@ public: lldb::ByteOrder byte_order, uint32_t addr_byte_size) = 0; -virtual ~PersistentExpressionState (); - virtual ConstString GetNextPersistentVariableName () = 0; @@ -312,6 +314,6 @@ private: LLVMCastKind m_kind; }; -} +} // namespace lldb_private -#endif /* liblldb_ExpressionVariable_h_ */ +#endif // liblldb_ExpressionVariable_h_ Modified: lldb/trunk/include/lldb/Expression/FunctionCaller.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/FunctionCaller.h?rev=251587&r1=251586&r2=251587&view=diff == --- lldb/trunk/include/lldb/Expression/FunctionCaller.h (original) +++ lldb/trunk/include/lldb/Expression/FunctionCaller.h Wed Oct 28 19:27:24 2015 @@ -1,4 +1,4 @@ -//===-- FunctionCaller.h -*- C++ -*-===// +//===-- FunctionCaller.h *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -12,8 +12,11 @@ // C Includes // C++ Includes -#include #include +#include +#include +#include + // Other libraries and framework includes // Project includes #include "lldb/Core/Address.h" @@ -55,7 +58,7 @@ namespace lldb_private /// a pointer set to LLDB_INVALID_ADDRESS and new structure will be allocated /// and its address returned in that variable. /// -/// Any of the methods that take arg_addr_ptr can be passed NULL, and the +/// Any of the methods that take arg_addr_ptr can be passed nullptr, and the /// argument space will be managed for you. //-- class FunctionCaller : public Expression @@ -202,7 +205,7 @@ public: /// The thread & process in which this function will run. /// /// @param[in] args_addr_ptr -/// If NULL, the function will take care of allocating & dea
[Lldb-commits] [lldb] r251647 - Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Target; other minor fixes.
Author: eugenezelenko Date: Thu Oct 29 15:12:40 2015 New Revision: 251647 URL: http://llvm.org/viewvc/llvm-project?rev=251647&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in some files in include/lldb/Target; other minor fixes. Modified: lldb/trunk/include/lldb/Target/Process.h lldb/trunk/include/lldb/Target/Target.h lldb/trunk/include/lldb/Target/Thread.h Modified: lldb/trunk/include/lldb/Target/Process.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=251647&r1=251646&r2=251647&view=diff == --- lldb/trunk/include/lldb/Target/Process.h (original) +++ lldb/trunk/include/lldb/Target/Process.h Thu Oct 29 15:12:40 2015 @@ -17,7 +17,8 @@ // C++ Includes #include -#include +#include +#include #include #include @@ -56,7 +57,7 @@ struct Range; class ProcessProperties : public Properties { public: -// Pass NULL for "process" if the ProcessProperties are to be the global copy +// Pass nullptr for "process" if the ProcessProperties are to be the global copy ProcessProperties (lldb_private::Process *process); ~ProcessProperties() override; @@ -107,11 +108,10 @@ public: GetWarningsOptimization () const; protected: - static void OptionValueChangedCallback (void *baton, OptionValue *option_value); -Process * m_process; // Can be NULL for global ProcessProperties +Process * m_process; // Can be nullptr for global ProcessProperties }; typedef std::shared_ptr ProcessPropertiesSP; @@ -327,9 +327,7 @@ public: const char * GetProcessPluginName () const { -if (m_plugin_name.empty()) -return NULL; -return m_plugin_name.c_str(); +return (m_plugin_name.empty() ? nullptr : m_plugin_name.c_str()); } void @@ -401,7 +399,6 @@ public: m_listener_sp = listener_sp; } - Listener & GetListenerForProcess (Debugger &debugger); @@ -420,18 +417,15 @@ protected: class ProcessLaunchCommandOptions : public Options { public: - ProcessLaunchCommandOptions (CommandInterpreter &interpreter) : Options(interpreter) { // Keep default values of all options in one place: OptionParsingStarting () OptionParsingStarting (); } - -~ProcessLaunchCommandOptions() override -{ -} - + +~ProcessLaunchCommandOptions() override = default; + Error SetOptionValue (uint32_t option_idx, const char *option_arg) override; @@ -539,11 +533,8 @@ protected: class ProcessInstanceInfoList { public: -ProcessInstanceInfoList () : -m_infos() -{ -} - +ProcessInstanceInfoList() = default; + void Clear() { @@ -565,25 +556,19 @@ public: const char * GetProcessNameAtIndex (size_t idx) { -if (idx < m_infos.size()) -return m_infos[idx].GetName(); -return NULL; +return ((idx < m_infos.size()) ? m_infos[idx].GetName() : nullptr); } size_t GetProcessNameLengthAtIndex (size_t idx) { -if (idx < m_infos.size()) -return m_infos[idx].GetNameLength(); -return 0; +return ((idx < m_infos.size()) ? m_infos[idx].GetNameLength() : 0); } lldb::pid_t GetProcessIDAtIndex (size_t idx) { -if (idx < m_infos.size()) -return m_infos[idx].GetProcessID(); -return 0; +return ((idx < m_infos.size()) ? m_infos[idx].GetProcessID() : 0); } bool @@ -610,7 +595,6 @@ protected: collection m_infos; }; - // This class tracks the Modification state of the process. Things that can currently modify // the program are running the program (which will up the StopID) and writing memory (which // will up the MemoryID.) @@ -618,7 +602,7 @@ protected: class ProcessModID { -friend bool operator== (const ProcessModID &lhs, const ProcessModID &rhs); +friend bool operator== (const ProcessModID &lhs, const ProcessModID &rhs); public: ProcessModID () : m_stop_id (0), @@ -644,7 +628,7 @@ public: return *this; } -~ProcessModID () {} +~ProcessModID() = default; void BumpStopID () { m_stop_id++; @@ -727,6 +711,7 @@ private: uint32_t m_running_user_expression; lldb::EventSP m_last_natural_stop_event; }; + inline bool operator== (const ProcessModID &lhs, const ProcessModID &rhs) { if (lhs.StopIDEqual (rhs) @@ -738,11 +723,7 @@ inline bool operator== (const ProcessMod inline bool operator!= (const ProcessModID &lhs, const ProcessModID &rhs) { -if (!lhs.StopIDEqual (rhs) -|| !lhs.MemoryIDEqual (rhs)) -return true; -else -return false; +return (!lhs.StopIDEqual (rhs) || !lhs.MemoryIDEqual (rhs)); } //-- @@
[Lldb-commits] [lldb] r251648 - Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Target; other minor fixes.
Author: eugenezelenko Date: Thu Oct 29 15:33:47 2015 New Revision: 251648 URL: http://llvm.org/viewvc/llvm-project?rev=251648&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in remaining files in include/lldb/Target; other minor fixes. Modified: lldb/trunk/include/lldb/Target/ExecutionContext.h lldb/trunk/include/lldb/Target/ObjCLanguageRuntime.h lldb/trunk/include/lldb/Target/Platform.h lldb/trunk/include/lldb/Target/QueueItem.h lldb/trunk/include/lldb/Target/StackFrame.h lldb/trunk/include/lldb/Target/StackFrameList.h lldb/trunk/include/lldb/Target/StackID.h lldb/trunk/include/lldb/Target/TargetList.h lldb/trunk/include/lldb/Target/ThreadPlanShouldStopHere.h lldb/trunk/include/lldb/Target/ThreadSpec.h Modified: lldb/trunk/include/lldb/Target/ExecutionContext.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ExecutionContext.h?rev=251648&r1=251647&r2=251648&view=diff == --- lldb/trunk/include/lldb/Target/ExecutionContext.h (original) +++ lldb/trunk/include/lldb/Target/ExecutionContext.h Thu Oct 29 15:33:47 2015 @@ -6,6 +6,21 @@ // License. See LICENSE.TXT for details. // //===--===// + +#ifndef liblldb_ExecutionContext_h_ +#define liblldb_ExecutionContext_h_ + +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes +#include "lldb/lldb-private.h" +#include "lldb/Target/StackID.h" +#include "lldb/Host/Mutex.h" + +namespace lldb_private { + +//===--===// /// Execution context objects refer to objects in the execution of the /// program that is being debugged. The consist of one or more of the /// following objects: target, process, thread, and frame. Many objects @@ -30,17 +45,6 @@ /// to a wide variety of functions that require execution contexts. //===--===// - - -#ifndef liblldb_ExecutionContext_h_ -#define liblldb_ExecutionContext_h_ - -#include "lldb/lldb-private.h" -#include "lldb/Target/StackID.h" -#include "lldb/Host/Mutex.h" - -namespace lldb_private { - //-- /// @class ExecutionContextRef ExecutionContext.h "lldb/Target/ExecutionContext.h" /// @brief A class that holds a weak reference to an execution context. @@ -86,7 +90,7 @@ public: ExecutionContextRef (const ExecutionContextRef &rhs); //-- -/// Construct using an ExecutionContext object that might be NULL. +/// Construct using an ExecutionContext object that might be nullptr. /// /// If \a exe_ctx_ptr is valid, then make weak references to any /// valid objects in the ExecutionContext, otherwise no weak @@ -102,22 +106,6 @@ public: ExecutionContextRef (const ExecutionContext &exe_ctx); //-- -/// Assignment operator -/// -/// Copy all weak references in \a rhs. -//-- -ExecutionContextRef & -operator =(const ExecutionContextRef &rhs); - -//-- -/// Assignment operator from a ExecutionContext -/// -/// Make weak references to any strongly referenced objects in \a exe_ctx. -//-- -ExecutionContextRef & -operator =(const ExecutionContext &exe_ctx); - -//-- /// Construct using the target and all the selected items inside of it /// (the process and its selected thread, and the thread's selected /// frame). If there is no selected thread, default to the first thread @@ -154,10 +142,27 @@ public: ExecutionContextRef (ExecutionContextScope &exe_scope); ~ExecutionContextRef(); + +//-- +/// Assignment operator +/// +/// Copy all weak references in \a rhs. +//-- +ExecutionContextRef & +operator =(const ExecutionContextRef &rhs); + +//-- +/// Assignment operator from a ExecutionContext +/// +/// Make weak references to any strongly referenced objects in \a exe_ctx. +//-- +ExecutionContextRef & +operator =(const ExecutionContext &exe_ctx); + //-- /// Clear the object's state. /// -/// S
[Lldb-commits] [lldb] r251673 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Symbol; other minor fixes.
Author: eugenezelenko Date: Thu Oct 29 19:04:20 2015 New Revision: 251673 URL: http://llvm.org/viewvc/llvm-project?rev=251673&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/Symbol; other minor fixes. Modified: lldb/trunk/include/lldb/Symbol/Block.h lldb/trunk/include/lldb/Symbol/ClangASTContext.h lldb/trunk/include/lldb/Symbol/ClangASTImporter.h lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCallbacks.h lldb/trunk/include/lldb/Symbol/ClangExternalASTSourceCommon.h lldb/trunk/include/lldb/Symbol/CompilerType.h lldb/trunk/include/lldb/Symbol/GoASTContext.h lldb/trunk/include/lldb/Symbol/LineTable.h lldb/trunk/include/lldb/Symbol/ObjectContainer.h lldb/trunk/include/lldb/Symbol/SymbolContext.h lldb/trunk/include/lldb/Symbol/SymbolContextScope.h lldb/trunk/include/lldb/Symbol/UnwindPlan.h Modified: lldb/trunk/include/lldb/Symbol/Block.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Block.h?rev=251673&r1=251672&r2=251673&view=diff == --- lldb/trunk/include/lldb/Symbol/Block.h (original) +++ lldb/trunk/include/lldb/Symbol/Block.h Thu Oct 29 19:04:20 2015 @@ -10,6 +10,12 @@ #ifndef liblldb_Block_h_ #define liblldb_Block_h_ +// C Includes +// C++ Includes +#include + +// Other libraries and framework includes +// Project includes #include "lldb/lldb-private.h" #include "lldb/Core/AddressRange.h" #include "lldb/Core/RangeMap.h" @@ -209,7 +215,7 @@ public: /// Get the parent block. /// /// @return -/// The parent block pointer, or NULL if this block has no +/// The parent block pointer, or nullptr if this block has no /// parent. //-- Block * @@ -221,7 +227,7 @@ public: /// @return /// If this block contains inlined function info, it will return /// this block, else parent blocks will be searched to see if -/// any contain this block. NULL will be returned if this block +/// any contain this block. nullptr will be returned if this block /// nor any parent blocks are inlined function blocks. //-- Block * @@ -231,7 +237,7 @@ public: /// Get the inlined parent block for this block. /// /// @return -/// The parent block pointer, or NULL if this block has no +/// The parent block pointer, or nullptr if this block has no /// parent. //-- Block * @@ -241,7 +247,7 @@ public: /// Get the sibling block for this block. /// /// @return -/// The sibling block pointer, or NULL if this block has no +/// The sibling block pointer, or nullptr if this block has no /// sibling. //-- Block * @@ -251,15 +257,13 @@ public: /// Get the first child block. /// /// @return -/// The first child block pointer, or NULL if this block has no +/// The first child block pointer, or nullptr if this block has no /// children. //-- Block * GetFirstChild () const { -if (m_children.empty()) -return NULL; -return m_children.front().get(); +return (m_children.empty() ? nullptr : m_children.front().get()); } //-- @@ -346,7 +350,7 @@ public: /// Get const accessor for any inlined function information. /// /// @return -/// A const pointer to any inlined function information, or NULL +/// A const pointer to any inlined function information, or nullptr /// if this is a regular block. //-- const InlineFunctionInfo* @@ -375,16 +379,16 @@ public: /// /// @param[in] name /// The method name for the inlined function. This value should -/// not be NULL. +/// not be nullptr. /// /// @param[in] mangled /// The mangled method name for the inlined function. This can -/// be NULL if there is no mangled name for an inlined function +/// be nullptr if there is no mangled name for an inlined function /// or if the name is the same as \a name. /// /// @param[in] decl_ptr /// A optional pointer to declaration information for the -/// inlined function information. This value can be NULL to +/// inlined function information. This value can be nullptr to /// indicate that no declaration information is available. /// /// @param[in] call_decl_ptr Mo
[Lldb-commits] [lldb] r251716 - Fix Clang-tidy modernize-use-nullptr warnings in source/Breakpoint; other minor fixes.
Author: eugenezelenko Date: Fri Oct 30 13:50:12 2015 New Revision: 251716 URL: http://llvm.org/viewvc/llvm-project?rev=251716&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in source/Breakpoint; other minor fixes. Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp lldb/trunk/source/Breakpoint/BreakpointID.cpp lldb/trunk/source/Breakpoint/BreakpointIDList.cpp lldb/trunk/source/Breakpoint/BreakpointLocation.cpp lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp lldb/trunk/source/Breakpoint/BreakpointOptions.cpp lldb/trunk/source/Breakpoint/BreakpointResolverName.cpp lldb/trunk/source/Breakpoint/BreakpointSite.cpp lldb/trunk/source/Breakpoint/StoppointCallbackContext.cpp lldb/trunk/source/Breakpoint/Watchpoint.cpp lldb/trunk/source/Breakpoint/WatchpointOptions.cpp Modified: lldb/trunk/source/Breakpoint/Breakpoint.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/Breakpoint.cpp?rev=251716&r1=251715&r2=251716&view=diff == --- lldb/trunk/source/Breakpoint/Breakpoint.cpp (original) +++ lldb/trunk/source/Breakpoint/Breakpoint.cpp Fri Oct 30 13:50:12 2015 @@ -7,12 +7,12 @@ // //===--===// - // C Includes // C++ Includes // Other libraries and framework includes -// Project includes +#include "llvm/Support/Casting.h" +// Project includes #include "lldb/Core/Address.h" #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointLocation.h" @@ -31,7 +31,6 @@ #include "lldb/Symbol/SymbolContext.h" #include "lldb/Target/Target.h" #include "lldb/Target/ThreadSpec.h" -#include "llvm/Support/Casting.h" using namespace lldb; using namespace lldb_private; @@ -83,9 +82,7 @@ Breakpoint::Breakpoint (Target &new_targ //-- // Destructor //-- -Breakpoint::~Breakpoint() -{ -} +Breakpoint::~Breakpoint() = default; const lldb::TargetSP Breakpoint::GetTargetSP () @@ -236,7 +233,7 @@ Breakpoint::SetThreadID (lldb::tid_t thr lldb::tid_t Breakpoint::GetThreadID () const { -if (m_options.GetThreadSpecNoCreate() == NULL) +if (m_options.GetThreadSpecNoCreate() == nullptr) return LLDB_INVALID_THREAD_ID; else return m_options.GetThreadSpecNoCreate()->GetTID(); @@ -255,7 +252,7 @@ Breakpoint::SetThreadIndex (uint32_t ind uint32_t Breakpoint::GetThreadIndex() const { -if (m_options.GetThreadSpecNoCreate() == NULL) +if (m_options.GetThreadSpecNoCreate() == nullptr) return 0; else return m_options.GetThreadSpecNoCreate()->GetIndex(); @@ -264,7 +261,7 @@ Breakpoint::GetThreadIndex() const void Breakpoint::SetThreadName (const char *thread_name) { -if (m_options.GetThreadSpec()->GetName() != NULL +if (m_options.GetThreadSpec()->GetName() != nullptr && ::strcmp (m_options.GetThreadSpec()->GetName(), thread_name) == 0) return; @@ -275,8 +272,8 @@ Breakpoint::SetThreadName (const char *t const char * Breakpoint::GetThreadName () const { -if (m_options.GetThreadSpecNoCreate() == NULL) -return NULL; +if (m_options.GetThreadSpecNoCreate() == nullptr) +return nullptr; else return m_options.GetThreadSpecNoCreate()->GetName(); } @@ -284,7 +281,7 @@ Breakpoint::GetThreadName () const void Breakpoint::SetQueueName (const char *queue_name) { -if (m_options.GetThreadSpec()->GetQueueName() != NULL +if (m_options.GetThreadSpec()->GetQueueName() != nullptr && ::strcmp (m_options.GetThreadSpec()->GetQueueName(), queue_name) == 0) return; @@ -295,8 +292,8 @@ Breakpoint::SetQueueName (const char *qu const char * Breakpoint::GetQueueName () const { -if (m_options.GetThreadSpecNoCreate() == NULL) -return NULL; +if (m_options.GetThreadSpecNoCreate() == nullptr) +return nullptr; else return m_options.GetThreadSpecNoCreate()->GetQueueName(); } @@ -456,7 +453,6 @@ Breakpoint::ModulesChanged (ModuleList & if (!seen) new_modules.AppendIfNeeded (module_sp); - } if (new_modules.GetSize() > 0) @@ -474,7 +470,7 @@ Breakpoint::ModulesChanged (ModuleList & removed_locations_event = new BreakpointEventData (eBreakpointEventTypeLocationsRemoved, shared_from_this()); else -removed_locations_event = NULL; +removed_locations_event = nullptr; size_t num_modules = module_list.GetSize(); for (size_t i = 0; i < num_modules; i++) @@ -502,7 +498,6 @@ Breakpoint::ModulesChanged (ModuleList & } if (delete_locat
[Lldb-commits] [lldb] r251730 - Fix Clang-tidy modernize-use-override warnings in include/lldb/Expression, source/Expression and tools/lldb-mi; other minor fixes.
Author: eugenezelenko Date: Fri Oct 30 19:43:59 2015 New Revision: 251730 URL: http://llvm.org/viewvc/llvm-project?rev=251730&view=rev Log: Fix Clang-tidy modernize-use-override warnings in include/lldb/Expression, source/Expression and tools/lldb-mi; other minor fixes. Modified: lldb/trunk/include/lldb/Expression/REPL.h lldb/trunk/source/Expression/IRDynamicChecks.cpp lldb/trunk/source/Expression/REPL.cpp lldb/trunk/tools/lldb-mi/MICmdArgSet.h lldb/trunk/tools/lldb-mi/MICmdArgValBase.cpp lldb/trunk/tools/lldb-mi/MICmdArgValBase.h lldb/trunk/tools/lldb-mi/MICmdBase.h Modified: lldb/trunk/include/lldb/Expression/REPL.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/REPL.h?rev=251730&r1=251729&r2=251730&view=diff == --- lldb/trunk/include/lldb/Expression/REPL.h (original) +++ lldb/trunk/include/lldb/Expression/REPL.h Fri Oct 30 19:43:59 2015 @@ -7,10 +7,15 @@ // //===--===// - #ifndef lldb_REPL_h #define lldb_REPL_h +// C Includes +// C++ Includes +#include + +// Other libraries and framework includes +// Project includes #include "lldb/Interpreter/OptionGroupFormat.h" #include "lldb/Interpreter/OptionGroupValueObjectDisplay.h" #include "lldb/../../source/Commands/CommandObjectExpression.h" @@ -35,7 +40,7 @@ public: REPL(LLVMCastKind kind, Target &target); -virtual ~REPL(); +~REPL() override; //-- /// Get a REPL with an existing target (or, failing that, a debugger to use), and (optional) extra arguments for the compiler. @@ -47,7 +52,7 @@ public: /// The language to create a REPL for. /// /// @param[in] debugger -/// If provided, and target is NULL, the debugger to use when setting up a top-level REPL. +/// If provided, and target is nullptr, the debugger to use when setting up a top-level REPL. /// /// @param[in] target /// If provided, the target to put the REPL inside. @@ -139,10 +144,6 @@ public: int max_matches, StringList &matches) override; -private: -std::string -GetSourcePath(); - protected: static int CalculateActualIndentation (const StringList &lines); @@ -199,8 +200,12 @@ protected: Target &m_target; lldb::IOHandlerSP m_io_handler_sp; LLVMCastKind m_kind; + +private: +std::string +GetSourcePath(); }; -} +} // namespace lldb_private -#endif /* REPL_h */ +#endif // lldb_REPL_h Modified: lldb/trunk/source/Expression/IRDynamicChecks.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRDynamicChecks.cpp?rev=251730&r1=251729&r2=251730&view=diff == --- lldb/trunk/source/Expression/IRDynamicChecks.cpp (original) +++ lldb/trunk/source/Expression/IRDynamicChecks.cpp Fri Oct 30 19:43:59 2015 @@ -1,4 +1,4 @@ -//===-- IRDynamicChecks.cpp ---*- C++ -*-===// +//===-- IRDynamicChecks.cpp -*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,6 +7,18 @@ // //===--===// +// C Includes +// C++ Includes +// Other libraries and framework includes +#include "llvm/Support/raw_ostream.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/DataLayout.h" +#include "llvm/IR/Function.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/Value.h" + +// Project includes #include "lldb/Expression/IRDynamicChecks.h" #include "lldb/Core/ConstString.h" @@ -18,14 +30,6 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" -#include "llvm/Support/raw_ostream.h" -#include "llvm/IR/Constants.h" -#include "llvm/IR/DataLayout.h" -#include "llvm/IR/Function.h" -#include "llvm/IR/Instructions.h" -#include "llvm/IR/Module.h" -#include "llvm/IR/Value.h" - using namespace llvm; using namespace lldb_private; @@ -41,13 +45,9 @@ static const char g_valid_pointer_check_ "unsigned char $__lldb_local_val = *$__lldb_arg_ptr;\n" "}"; -DynamicCheckerFunctions::DynamicCheckerFunctions () -{ -} +DynamicCheckerFunctions::DynamicCheckerFunctions() = default; -DynamicCheckerFunctions::~DynamicCheckerFunctions () -{ -} +DynamicCheckerFunctions::~DynamicCheckerFunctions() = default; bool DynamicCheckerFunctions::Install(Stream &error_stream, @@ -87,12 +87,12 @@ DynamicCheckerFunctions::DoCheckersExpla { // FIXME: We have to get the checkers to know why they scotched the call in more detail, // so we can print a better message here. -if (m_valid_pointer_check.get() != NULL && m_valid_pointer_check->ContainsAddress
[Lldb-commits] [lldb] r251733 - Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/API and source/API; other minor fixes.
Author: eugenezelenko Date: Fri Oct 30 20:22:59 2015 New Revision: 251733 URL: http://llvm.org/viewvc/llvm-project?rev=251733&view=rev Log: Fix Clang-tidy modernize-use-nullptr warnings in include/lldb/API and source/API; other minor fixes. Other fixes should reduce number of readability-redundant-smartptr-get and readability-implicit-bool-cast. Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h lldb/trunk/include/lldb/API/SBCommandReturnObject.h lldb/trunk/include/lldb/API/SBDebugger.h lldb/trunk/include/lldb/API/SBTarget.h lldb/trunk/source/API/SBBreakpoint.cpp lldb/trunk/source/API/SBCommandInterpreter.cpp lldb/trunk/source/API/SBCommandReturnObject.cpp lldb/trunk/source/API/SBDebugger.cpp lldb/trunk/source/API/SBFrame.cpp Modified: lldb/trunk/include/lldb/API/SBCommandInterpreter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandInterpreter.h?rev=251733&r1=251732&r2=251733&view=diff == --- lldb/trunk/include/lldb/API/SBCommandInterpreter.h (original) +++ lldb/trunk/include/lldb/API/SBCommandInterpreter.h Fri Oct 30 20:22:59 2015 @@ -10,6 +10,12 @@ #ifndef LLDB_SBCommandInterpreter_h_ #define LLDB_SBCommandInterpreter_h_ +// C Includes +// C++ Includes +#include + +// Other libraries and framework includes +// Project includes #include "lldb/API/SBDefines.h" #include "lldb/API/SBDebugger.h" @@ -59,6 +65,7 @@ public: void SetAddToHistory (bool); + private: lldb_private::CommandInterpreterRunOptions * get () const; @@ -84,11 +91,11 @@ public: SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs); +~SBCommandInterpreter (); + const lldb::SBCommandInterpreter & operator = (const lldb::SBCommandInterpreter &rhs); -~SBCommandInterpreter (); - static const char * GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type); @@ -187,7 +194,7 @@ public: lldb::CommandOverrideCallback callback, void *baton); -SBCommandInterpreter (lldb_private::CommandInterpreter *interpreter_ptr = NULL); // Access using SBDebugger::GetCommandInterpreter(); +SBCommandInterpreter(lldb_private::CommandInterpreter *interpreter_ptr = nullptr); // Access using SBDebugger::GetCommandInterpreter(); //-- /// Return true if the command interpreter is the active IO handler. @@ -213,7 +220,7 @@ public: /// /// @return /// The string that should be written into the file handle that is -/// feeding the input stream for the debugger, or NULL if there is +/// feeding the input stream for the debugger, or nullptr if there is /// no string for this control key. //-- const char * @@ -233,7 +240,6 @@ public: ResolveCommand(const char *command_line, SBCommandReturnObject &result); protected: - lldb_private::CommandInterpreter & ref (); @@ -242,6 +248,7 @@ protected: void reset (lldb_private::CommandInterpreter *); + private: friend class SBDebugger; @@ -254,6 +261,9 @@ private: class SBCommandPluginInterface { public: +virtual +~SBCommandPluginInterface() = default; + virtual bool DoExecute (lldb::SBDebugger /*debugger*/, char** /*command*/, @@ -261,16 +271,11 @@ public: { return false; } - -virtual -~SBCommandPluginInterface () -{} }; class SBCommand { public: - SBCommand (); bool @@ -298,13 +303,12 @@ public: SetFlags (uint32_t flags); lldb::SBCommand -AddMultiwordCommand (const char* name, const char* help = NULL); +AddMultiwordCommand(const char* name, const char* help = nullptr); lldb::SBCommand -AddCommand (const char* name, lldb::SBCommandPluginInterface* impl, const char* help = NULL); +AddCommand(const char* name, lldb::SBCommandPluginInterface* impl, const char* help = nullptr); private: - friend class SBDebugger; friend class SBCommandInterpreter; Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=251733&r1=251732&r2=251733&view=diff == --- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original) +++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Fri Oct 30 20:22:59 2015 @@ -10,8 +10,14 @@ #ifndef LLDB_SBCommandReturnObject_h_ #define LLDB_SBCommandReturnObject_h_ +// C Includes #include +// C++ Includes +#include + +// Other libraries and framework includes +// Project includes #include "l
[Lldb-commits] [lldb] r252374 - Fix some Clang-tidy warnings and formatting in recently added code.
Author: eugenezelenko Date: Fri Nov 6 18:28:50 2015 New Revision: 252374 URL: http://llvm.org/viewvc/llvm-project?rev=252374&view=rev Log: Fix some Clang-tidy warnings and formatting in recently added code. Fixed Clang-tidy warnings: * modernize-use-override; * modernize-use-nullptr; * modernize-use-default; * readability-simplify-boolean-expr. Modified: lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.h lldb/trunk/source/Plugins/Language/Go/GoFormatterFunctions.cpp lldb/trunk/source/Plugins/Language/ObjC/NSError.cpp lldb/trunk/source/Plugins/Language/ObjC/NSException.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h Modified: lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp?rev=252374&r1=252373&r2=252374&view=diff == --- lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp (original) +++ lldb/trunk/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp Fri Nov 6 18:28:50 2015 @@ -1,4 +1,4 @@ -//===-- GoUserExpression.cpp -*- C++ -*-===// +//===-- GoUserExpression.cpp *- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,16 +7,23 @@ // //===--===// +// C Includes #include #if HAVE_SYS_TYPES_H #include #endif +// C++ Includes #include +#include #include -#include #include +// Other libraries and framework includes +#include "llvm/ADT/StringRef.h" +#include "llvm/ADT/StringMap.h" + +// Project includes #include "GoUserExpression.h" #include "lldb/lldb-private.h" @@ -41,8 +48,6 @@ #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlan.h" #include "lldb/Target/ThreadPlanCallUserExpression.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/ADT/StringMap.h" #include "Plugins/ExpressionParser/Go/GoAST.h" #include "Plugins/ExpressionParser/Go/GoParser.h" @@ -86,6 +91,7 @@ class GoUserExpression::GoInterpreter m_parser.GetError(m_error); return nullptr; } + ValueObjectSP VisitParenExpr(const GoASTParenExpr *e); ValueObjectSP VisitIdent(const GoASTIdent *e); ValueObjectSP VisitStarExpr(const GoASTStarExpr *e); @@ -94,66 +100,79 @@ class GoUserExpression::GoInterpreter ValueObjectSP VisitIndexExpr(const GoASTIndexExpr *e); ValueObjectSP VisitUnaryExpr(const GoASTUnaryExpr *e); ValueObjectSP VisitCallExpr(const GoASTCallExpr *e); + ValueObjectSP VisitTypeAssertExpr(const GoASTTypeAssertExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitBinaryExpr(const GoASTBinaryExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitArrayType(const GoASTArrayType *e) { return NotImplemented(e); } + ValueObjectSP VisitChanType(const GoASTChanType *e) { return NotImplemented(e); } + ValueObjectSP VisitCompositeLit(const GoASTCompositeLit *e) { return NotImplemented(e); } + ValueObjectSP VisitEllipsis(const GoASTEllipsis *e) { return NotImplemented(e); } + ValueObjectSP VisitFuncType(const GoASTFuncType *e) { return NotImplemented(e); } + ValueObjectSP VisitFuncLit(const GoASTFuncLit *e) { return NotImplemented(e); } + ValueObjectSP VisitInterfaceType(const GoASTInterfaceType *e) { return NotImplemented(e); } + ValueObjectSP VisitKeyValueExpr(const GoASTKeyValueExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitMapType(const GoASTMapType *e) { return NotImplemented(e); } + ValueObjectSP VisitSliceExpr(const GoASTSliceExpr *e) { return NotImplemented(e); } + ValueObjectSP VisitStructType(const GoASTStructType *e) { @@ -217,6 +236,7 @@ LookupType(TargetSP target, ConstString } return CompilerType(); } + GoUserExpression::GoUserExpression(ExecutionContextScope &exe_scope, const char *expr, const char *expr_prefix, lldb::LanguageType language, ResultType desired_type, const EvaluateExpressionOptions &options) @@ -531,7 +551,7 @@ GoUserExpression::GoInterpreter::VisitBa return nullptr; } errno = 0; -int64_t intvalue = strtol(value.c
Re: [Lldb-commits] [PATCH] D14555: Create PythonCallable and PythonTuple wrappers with appropriate unit tests
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please also run Clang-tidy modernize checks. Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp:895 @@ +894,3 @@ + + +void Unnecessary line. Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:300 @@ -297,2 +299,3 @@ public: +PythonList() {} explicit PythonList(PyInitialValue value); Should be PythonList() = default; Same for other similar default constructors. Comment at: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:337 @@ +336,3 @@ + +~PythonTuple() override; + Should be ~PythonTuple() override = default; Same for PythonCallable. http://reviews.llvm.org/D14555 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15067: Design building out of sources
Eugene.Zelenko added a comment. I build LLVM/Clang with LLVM_ENABLE_WARNINGS=ON, so I'll need to use llvm-config from build directory. I'm not sure how well find_program will work if path to /bin will be not added to PATH, so probably will be good idea to allow LLVM_CONFIG to be set in Cmake command line and use find_program only if LLVM_CONFIG is not set. Repository: rL LLVM http://reviews.llvm.org/D15067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15067: Design building out of sources
Eugene.Zelenko added a comment. In http://reviews.llvm.org/D15067#298830, @krytarowski wrote: > In http://reviews.llvm.org/D15067#298701, @Eugene.Zelenko wrote: > > > I build LLVM/Clang with LLVM_ENABLE_WARNINGS=ON, so I'll need to use > > llvm-config from build directory. I'm not sure how well find_program will > > work if path to /bin will be not added to PATH, so > > probably will be good idea to allow LLVM_CONFIG to be set in Cmake command > > line and use find_program only if LLVM_CONFIG is not set. > > > This should be already handled by CMake: > https://cmake.org/cmake/help/v3.0/command/find_program.html But it's necessary to pass path from CMake command line argument to find_program after PATHS. Another problem if default OS location (if Clang installed and of old version) will be returned instead of build one. Repository: rL LLVM http://reviews.llvm.org/D15067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15067: Design building out of sources
Eugene.Zelenko added a comment. In http://reviews.llvm.org/D15067#299220, @labath wrote: > In http://reviews.llvm.org/D15067#298902, @Eugene.Zelenko wrote: > > > But it's necessary to pass path from CMake command line argument to > > find_program after PATHS. Another problem if default OS location (if Clang > > installed and of old version) will be returned instead of build one. > > > I don't know what would be the idiomatic cmake-fu to achieve that, but I'd > just pass the the full path to the llvm-config binary, including the name. > This way, we could also handle cases when the binary has a version suffix > (e.g., debian likes to ship the binary as llvm-config-3.x). I think find_program() should be called if LLVM_CONFIG is empty or not exist. Repository: rL LLVM http://reviews.llvm.org/D15067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.
Author: eugenezelenko Date: Fri Dec 11 13:52:15 2015 New Revision: 255364 URL: http://llvm.org/viewvc/llvm-project?rev=255364&view=rev Log: Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp. Simplify smart pointers checks in conditions. Modified: lldb/trunk/source/Target/Target.cpp Modified: lldb/trunk/source/Target/Target.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=255364&r1=255363&r2=255364&view=diff == --- lldb/trunk/source/Target/Target.cpp (original) +++ lldb/trunk/source/Target/Target.cpp Fri Dec 11 13:52:15 2015 @@ -178,7 +178,7 @@ Target::CleanupProcess () void Target::DeleteCurrentProcess () { -if (m_process_sp.get()) +if (m_process_sp) { m_section_load_history.Clear(); if (m_process_sp->IsAlive()) @@ -333,7 +333,7 @@ Target::CreateSourceRegexBreakpoint (con SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList (containingModules, source_file_spec_list)); if (move_to_nearest_code == eLazyBoolCalculate) move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : eLazyBoolNo; -BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex (NULL, source_regex, !static_cast(move_to_nearest_code))); +BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex(nullptr, source_regex, !static_cast(move_to_nearest_code))); return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true); } @@ -385,12 +385,12 @@ Target::CreateBreakpoint (const FileSpec if (move_to_nearest_code == eLazyBoolCalculate) move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : eLazyBoolNo; -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL, - file, - line_no, - check_inlines, - skip_prologue, - !static_cast(move_to_nearest_code))); +BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine(nullptr, +file, +line_no, + check_inlines, + skip_prologue, + !static_cast(move_to_nearest_code))); return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, true); } @@ -420,7 +420,7 @@ BreakpointSP Target::CreateBreakpoint (const Address &addr, bool internal, bool hardware) { SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches (shared_from_this())); -BreakpointResolverSP resolver_sp (new BreakpointResolverAddress (NULL, addr)); +BreakpointResolverSP resolver_sp(new BreakpointResolverAddress(nullptr, addr)); return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, false); } @@ -431,7 +431,7 @@ Target::CreateAddressInModuleBreakpoint bool request_hardware) { SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches (shared_from_this())); -BreakpointResolverSP resolver_sp (new BreakpointResolverAddress (NULL, file_addr, file_spec)); +BreakpointResolverSP resolver_sp(new BreakpointResolverAddress(nullptr, file_addr, file_spec)); return CreateBreakpoint (filter_sp, resolver_sp, internal, request_hardware, false); } @@ -455,12 +455,12 @@ Target::CreateBreakpoint (const FileSpec if (language == lldb::eLanguageTypeUnknown) language = GetLanguage(); -BreakpointResolverSP resolver_sp (new BreakpointResolverName (NULL, - func_name, - func_name_type_mask, - language, - Breakpoint::Exact, - skip_prologue)); +BreakpointResolverSP resolver_sp(new BreakpointResolverName(nullptr, +func_name, + func_name_type_mask, +language, + Breakpoint::Exact, +
Re: [Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.
Hi, Todd! As far as I know Clang-format doesn't leave spaces. Somebody pointed to old discussion on this matter, but I forgot it locations :-( I think will be good idea to implement automatic run of Clang-format as pre-commit hook, since LLDB code have too much diversity in code formatting for single project. Eugene. On Fri, Dec 11, 2015 at 1:55 PM, Todd Fiala wrote: > Hey Eugene and Greg, > > I thought we were doing spaces before the open parens in places like this: > > -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine (NULL, > ... > +BreakpointResolverSP resolver_sp(new > BreakpointResolverFileLine(nullptr, > > (see the removal of the space after BreakpointResolverFileLine from the > clang-tidy settings I presume). > > Did I misunderstand that? > > -Todd > > On Fri, Dec 11, 2015 at 11:52 AM, Eugene Zelenko via lldb-commits > wrote: >> >> Author: eugenezelenko >> Date: Fri Dec 11 13:52:15 2015 >> New Revision: 255364 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=255364&view=rev >> Log: >> Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr >> warnings in source/Target/Target.cpp. >> >> Simplify smart pointers checks in conditions. >> >> Modified: >> lldb/trunk/source/Target/Target.cpp >> >> Modified: lldb/trunk/source/Target/Target.cpp >> URL: >> http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=255364&r1=255363&r2=255364&view=diff >> >> == >> --- lldb/trunk/source/Target/Target.cpp (original) >> +++ lldb/trunk/source/Target/Target.cpp Fri Dec 11 13:52:15 2015 >> @@ -178,7 +178,7 @@ Target::CleanupProcess () >> void >> Target::DeleteCurrentProcess () >> { >> -if (m_process_sp.get()) >> +if (m_process_sp) >> { >> m_section_load_history.Clear(); >> if (m_process_sp->IsAlive()) >> @@ -333,7 +333,7 @@ Target::CreateSourceRegexBreakpoint (con >> SearchFilterSP filter_sp(GetSearchFilterForModuleAndCUList >> (containingModules, source_file_spec_list)); >> if (move_to_nearest_code == eLazyBoolCalculate) >> move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : >> eLazyBoolNo; >> -BreakpointResolverSP resolver_sp(new BreakpointResolverFileRegex >> (NULL, source_regex, !static_cast(move_to_nearest_code))); >> +BreakpointResolverSP resolver_sp(new >> BreakpointResolverFileRegex(nullptr, source_regex, >> !static_cast(move_to_nearest_code))); >> return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, >> true); >> } >> >> @@ -385,12 +385,12 @@ Target::CreateBreakpoint (const FileSpec >> if (move_to_nearest_code == eLazyBoolCalculate) >> move_to_nearest_code = GetMoveToNearestCode() ? eLazyBoolYes : >> eLazyBoolNo; >> >> -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine >> (NULL, >> - >> file, >> - >> line_no, >> - >> check_inlines, >> - >> skip_prologue, >> - >> !static_cast(move_to_nearest_code))); >> +BreakpointResolverSP resolver_sp(new >> BreakpointResolverFileLine(nullptr, >> +file, >> + >> line_no, >> + >> check_inlines, >> + >> skip_prologue, >> + >> !static_cast(move_to_nearest_code))); >> return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, >> true); >> } >> >> @@ -420,7 +420,7 @@ BreakpointSP >> Target::CreateBreakpoint (const Address &addr, bool internal, bool >> hardware) >> { >> SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches >> (shared_from_this())); >> -BreakpointResolverSP resolver_sp (new BreakpointResolverAddress >> (NULL, addr)); >> +BreakpointResolverSP resolver_sp(new >> BreakpointResolverAddress(nullptr, addr)); >> return CreateBreakpoint (filter_sp, resolver_sp, internal, hardware, >> false); >> } >> >> @@ -431,7 +431,7 @@ Target::CreateAddressInModuleBreakpoint >> bool request_hardware) >> { >> SearchFilterSP filter_sp(new SearchFilterForUnconstrainedSearches >> (shared_from_this())); >> -BreakpointResolverSP resolver_sp (new BreakpointResolverAddress >> (NULL, file_addr, file_spec)); >> +BreakpointResolverSP resolver_sp(new >> BreakpointResolverA
Re: [Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.
At least clang-format should be applied to all newly added files before commit. Eugene. On Fri, Dec 11, 2015 at 2:30 PM, Zachary Turner wrote: > Back on the topic of clang-format, what would it take to make clang-format a > regular part of peoples' workflows? > > On Fri, Dec 11, 2015 at 2:27 PM Todd Fiala wrote: >> >> Yep - sorry. I had been talking to Greg about this and misunderstood his >> comment on it. My mistake entirely. Kate and I just talked and she pointed >> me to your document, Jim. >> >> The description was: >> where we had a clearly adhered to standard, keep it. >> whee we didn't, we adopted LLVM. >> >> Sorry for rehashing! >> >> -Todd >> >> On Fri, Dec 11, 2015 at 2:12 PM, Jim Ingham wrote: >>> >>> >>> On Dec 11, 2015, at 2:01 PM, Todd Fiala via lldb-commits >>> wrote: >>> >>> >>> >>> On Fri, Dec 11, 2015 at 1:59 PM, Zachary Turner >>> wrote: On Fri, Dec 11, 2015 at 1:55 PM Todd Fiala via lldb-commits wrote: > > Hey Eugene and Greg, > > I thought we were doing spaces before the open parens in places like > this: > > -BreakpointResolverSP resolver_sp(new BreakpointResolverFileLine > (NULL, > ... > +BreakpointResolverSP resolver_sp(new > BreakpointResolverFileLine(nullptr, > > (see the removal of the space after BreakpointResolverFileLine from the > clang-tidy settings I presume). > > Did I misunderstand that? This was officially removed from the coding standard some months ago, >>> >>> >>> Okay. Are we 100% in sync with LLVM coding standard guidelines? If so I >>> can just look there to see what we're supposed to be doing. >>> >>> >>> No, the differences between the lldb and llvm coding standards are >>> documented in: >>> >>> http://lldb.llvm.org/lldb-coding-conventions.html >>> >>> Jim >>> >>> but not everyone has adopted this unfortunately. See r228860. It pains me to no end that we differ from LLVM, because it leads to exactly these type of problems where people aren't sure what the exact set of rules are. >>> >>> >>> >>> >>> -- >>> -Todd >>> ___ >>> lldb-commits mailing list >>> lldb-commits@lists.llvm.org >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >>> >>> >> >> >> >> -- >> -Todd ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [lldb] r255364 - Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.
Yes, it's in the .clang-format at LLDB source root. Eugene. On Fri, Dec 11, 2015 at 2:37 PM, Todd Fiala wrote: > Okay, but does the format match the LLDB-modified format with some kind of > configuration file? We still need to match our guidelines here: > > http://lldb.llvm.org/lldb-coding-conventions.html > > We can achieve that with a config file for it, right? (Maybe already > existing, maybe in the lldb source tree already?) > > On Fri, Dec 11, 2015 at 2:35 PM, Zachary Turner wrote: >> >> With git you can already run "git clang-format". You just need >> `git-clang-format` to be in your PATH (it's under llvm/tools/clang). Not >> sure how to hook it into SVN >> >> On Fri, Dec 11, 2015 at 2:32 PM Eugene Zelenko >> wrote: >>> >>> At least clang-format should be applied to all newly added files before >>> commit. >>> >>> Eugene. >>> >>> On Fri, Dec 11, 2015 at 2:30 PM, Zachary Turner >>> wrote: >>> > Back on the topic of clang-format, what would it take to make >>> > clang-format a >>> > regular part of peoples' workflows? >>> > >>> > On Fri, Dec 11, 2015 at 2:27 PM Todd Fiala >>> > wrote: >>> >> >>> >> Yep - sorry. I had been talking to Greg about this and misunderstood >>> >> his >>> >> comment on it. My mistake entirely. Kate and I just talked and she >>> >> pointed >>> >> me to your document, Jim. >>> >> >>> >> The description was: >>> >> where we had a clearly adhered to standard, keep it. >>> >> whee we didn't, we adopted LLVM. >>> >> >>> >> Sorry for rehashing! >>> >> >>> >> -Todd >>> >> >>> >> On Fri, Dec 11, 2015 at 2:12 PM, Jim Ingham wrote: >>> >>> >>> >>> >>> >>> On Dec 11, 2015, at 2:01 PM, Todd Fiala via lldb-commits >>> >>> wrote: >>> >>> >>> >>> >>> >>> >>> >>> On Fri, Dec 11, 2015 at 1:59 PM, Zachary Turner >>> >>> wrote: >>> >>> On Fri, Dec 11, 2015 at 1:55 PM Todd Fiala via lldb-commits >>> wrote: >>> > >>> > Hey Eugene and Greg, >>> > >>> > I thought we were doing spaces before the open parens in places >>> > like >>> > this: >>> > >>> > -BreakpointResolverSP resolver_sp(new >>> > BreakpointResolverFileLine >>> > (NULL, >>> > ... >>> > +BreakpointResolverSP resolver_sp(new >>> > BreakpointResolverFileLine(nullptr, >>> > >>> > (see the removal of the space after BreakpointResolverFileLine from >>> > the >>> > clang-tidy settings I presume). >>> > >>> > Did I misunderstand that? >>> >>> >>> This was officially removed from the coding standard some months >>> ago, >>> >>> >>> >>> >>> >>> Okay. Are we 100% in sync with LLVM coding standard guidelines? If >>> >>> so I >>> >>> can just look there to see what we're supposed to be doing. >>> >>> >>> >>> >>> >>> No, the differences between the lldb and llvm coding standards are >>> >>> documented in: >>> >>> >>> >>> http://lldb.llvm.org/lldb-coding-conventions.html >>> >>> >>> >>> Jim >>> >>> >>> >>> >>> >>> but not everyone has adopted this unfortunately. See r228860. It >>> pains >>> me to no end that we differ from LLVM, because it leads to exactly >>> these >>> type of problems where people aren't sure what the exact set of >>> rules are. >>> >>> >>> >>> >>> >>> >>> >>> >>> >>> -- >>> >>> -Todd >>> >>> ___ >>> >>> lldb-commits mailing list >>> >>> lldb-commits@lists.llvm.org >>> >>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits >>> >>> >>> >>> >>> >> >>> >> >>> >> >>> >> -- >>> >> -Todd > > > > > -- > -Todd ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D19991: [LLDB] Fix standalone build on RHEL6
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: zturner, labath. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. There were unresolved symbols related to coverage. Repository: rL LLVM http://reviews.llvm.org/D19991 Files: cmake/LLDBDependencies.cmake Index: cmake/LLDBDependencies.cmake === --- cmake/LLDBDependencies.cmake +++ cmake/LLDBDependencies.cmake @@ -195,6 +195,7 @@ runtimedyld option support + coverage ) if ( NOT LLDB_DISABLE_PYTHON ) Index: cmake/LLDBDependencies.cmake === --- cmake/LLDBDependencies.cmake +++ cmake/LLDBDependencies.cmake @@ -195,6 +195,7 @@ runtimedyld option support + coverage ) if ( NOT LLDB_DISABLE_PYTHON ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D19991: [LLDB] Fix standalone build on RHEL6
Eugene.Zelenko added a comment. Undefined symbols were used in clang::CodeGen::CoverageMappingGen. Repository: rL LLVM http://reviews.llvm.org/D19991 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r268750 - Fix standalone build on RHEL6.
Author: eugenezelenko Date: Fri May 6 12:03:09 2016 New Revision: 268750 URL: http://llvm.org/viewvc/llvm-project?rev=268750&view=rev Log: Fix standalone build on RHEL6. Differential revision: http://reviews.llvm.org/D19991 Modified: lldb/trunk/cmake/LLDBDependencies.cmake Modified: lldb/trunk/cmake/LLDBDependencies.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/LLDBDependencies.cmake?rev=268750&r1=268749&r2=268750&view=diff == --- lldb/trunk/cmake/LLDBDependencies.cmake (original) +++ lldb/trunk/cmake/LLDBDependencies.cmake Fri May 6 12:03:09 2016 @@ -195,6 +195,7 @@ set(LLVM_LINK_COMPONENTS runtimedyld option support + coverage ) if ( NOT LLDB_DISABLE_PYTHON ) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15067: Add CMake bits necessary for standalone build
Eugene.Zelenko added a comment. I would like to see implemented my comment about LLVM_CONFIG and find_program(). Repository: rL LLVM http://reviews.llvm.org/D15067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15067: Add CMake bits necessary for standalone build
Eugene.Zelenko added a comment. In http://reviews.llvm.org/D15067#427834, @krytarowski wrote: > In http://reviews.llvm.org/D15067#427814, @Eugene.Zelenko wrote: > > > I would like to see implemented my comment about LLVM_CONFIG and > > find_program(). > > > Could you first push this to clang? I don't want to drift from clang myself. I'm not sure about Clang make files, but I built Clang with LLVM. LLDB is more problematic, so I build it standalone with previously build Clang. This why I'd like to specify path in CMake parameters, not relying in find_program(). Repository: rL LLVM http://reviews.llvm.org/D15067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D15067: Add CMake bits necessary for standalone build
Eugene.Zelenko added a comment. In http://reviews.llvm.org/D15067#428146, @krytarowski wrote: > @Eugene.Zelenko do you agree with this patch and what @labath wrote? If CMake works that way, it's what I need :-) Repository: rL LLVM http://reviews.llvm.org/D15067 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D18018: [LLDB] Fix standalone build with CMake 2.8.12.2, broken after adding SymbolFile PDB plugin
Eugene.Zelenko abandoned this revision. Eugene.Zelenko added a comment. Obsoleted by http://reviews.llvm.org/D20344. Repository: rL LLVM http://reviews.llvm.org/D18018 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D20344: [LLDB] Fix standalone LLDB build when LLVM/Clang were built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: labath, krytarowski, zturner. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Patch also includes fix for CMake 2.8.12.2, see D18018. Repository: rL LLVM http://reviews.llvm.org/D20344 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -4,6 +4,10 @@ project(lldb) cmake_minimum_required(VERSION 2.8.12.2) + if (POLICY CMP0022) +cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required + endif() + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) # Rely on llvm-config. @@ -96,7 +100,9 @@ # Import CMake library targets from LLVM and Clang. include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake") - include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + endif() set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -104,6 +110,15 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") + if (EXISTS "${LLVM_OBJ_ROOT}/include") +include_directories("${LLVM_OBJ_ROOT}/include") + endif() + if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include") +include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include") + endif() + if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include") +include_directories("${LLVM_OBJ_ROOT}/tools/clang/include") + endif() link_directories("${LLVM_LIBRARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -4,6 +4,10 @@ project(lldb) cmake_minimum_required(VERSION 2.8.12.2) + if (POLICY CMP0022) +cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required + endif() + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) # Rely on llvm-config. @@ -96,7 +100,9 @@ # Import CMake library targets from LLVM and Clang. include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake") - include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") +include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + endif() set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -104,6 +110,15 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") + if (EXISTS "${LLVM_OBJ_ROOT}/include") +include_directories("${LLVM_OBJ_ROOT}/include") + endif() + if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include") +include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include") + endif() + if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include") +include_directories("${LLVM_OBJ_ROOT}/tools/clang/include") + endif() link_directories("${LLVM_LIBRARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20344: [LLDB] Fix standalone LLDB build when LLVM/Clang were built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON
Eugene.Zelenko updated this revision to Diff 57648. Eugene.Zelenko added a comment. Add comments per Pavel suggestion. Repository: rL LLVM http://reviews.llvm.org/D20344 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -4,6 +4,10 @@ project(lldb) cmake_minimum_required(VERSION 2.8.12.2) + if (POLICY CMP0022) +cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required + endif() + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) # Rely on llvm-config. @@ -96,7 +100,10 @@ # Import CMake library targets from LLVM and Clang. include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake") - include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + # cmake/clang/ClangConfig.cmake is not created when LLVM and Cland are built together. + if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + endif() set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -104,6 +111,17 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") + # Next three include directories are needed when llvm-config is located in build directory. + # LLVM and Cland are assumed to be built together + if (EXISTS "${LLVM_OBJ_ROOT}/include") +include_directories("${LLVM_OBJ_ROOT}/include") + endif() + if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include") +include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include") + endif() + if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include") +include_directories("${LLVM_OBJ_ROOT}/tools/clang/include") + endif() link_directories("${LLVM_LIBRARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -4,6 +4,10 @@ project(lldb) cmake_minimum_required(VERSION 2.8.12.2) + if (POLICY CMP0022) +cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required + endif() + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) # Rely on llvm-config. @@ -96,7 +100,10 @@ # Import CMake library targets from LLVM and Clang. include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake") - include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + # cmake/clang/ClangConfig.cmake is not created when LLVM and Cland are built together. + if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") +include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + endif() set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -104,6 +111,17 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") + # Next three include directories are needed when llvm-config is located in build directory. + # LLVM and Cland are assumed to be built together + if (EXISTS "${LLVM_OBJ_ROOT}/include") +include_directories("${LLVM_OBJ_ROOT}/include") + endif() + if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include") +include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include") + endif() + if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include") +include_directories("${LLVM_OBJ_ROOT}/tools/clang/include") + endif() link_directories("${LLVM_LIBRARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r269996 - Fix standalone LLDB build, when LLVM/Clang were built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON.
Author: eugenezelenko Date: Wed May 18 17:50:08 2016 New Revision: 269996 URL: http://llvm.org/viewvc/llvm-project?rev=269996&view=rev Log: Fix standalone LLDB build, when LLVM/Clang were built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON. Fix standalone build with CMake 2.8.12.2. Differential revision: http://reviews.llvm.org/D20344 Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=269996&r1=269995&r2=269996&view=diff == --- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original) +++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Wed May 18 17:50:08 2016 @@ -4,6 +4,10 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR project(lldb) cmake_minimum_required(VERSION 2.8.12.2) + if (POLICY CMP0022) +cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required + endif() + option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) # Rely on llvm-config. @@ -96,7 +100,10 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR # Import CMake library targets from LLVM and Clang. include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm/LLVMConfig.cmake") - include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + # cmake/clang/ClangConfig.cmake is not created when LLVM and Cland are built together. + if (EXISTS "${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + include("${LLVM_OBJ_ROOT}/lib${LLVM_LIBDIR_SUFFIX}/cmake/clang/ClangConfig.cmake") + endif() set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") @@ -104,6 +111,17 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}") + # Next three include directories are needed when llvm-config is located in build directory. + # LLVM and Cland are assumed to be built together + if (EXISTS "${LLVM_OBJ_ROOT}/include") +include_directories("${LLVM_OBJ_ROOT}/include") + endif() + if (EXISTS "${LLVM_MAIN_SRC_DIR}/tools/clang/include") +include_directories("${LLVM_MAIN_SRC_DIR}/tools/clang/include") + endif() + if (EXISTS "${LLVM_OBJ_ROOT}/tools/clang/include") +include_directories("${LLVM_OBJ_ROOT}/tools/clang/include") + endif() link_directories("${LLVM_LIBRARY_DIR}") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. This change broke standalone build. Looks like check which should set HAVE_CXX_ATOMICS64_WITHOUT_LIB was not performed. I build LLDB with LLVM STL which doesn't have libatomic. Repository: rL LLVM http://reviews.llvm.org/D20464 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.
Eugene.Zelenko added a comment. I see HAVE_CXX_ATOMICS64_WITHOUT_LIB messages during LLVM Cmake run, but I don't see such message during LLDB CMake run. Is this value is supposed to be read form LLVM CMake cache? Repository: rL LLVM http://reviews.llvm.org/D20464 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.
Eugene.Zelenko added a comment. I run CMake with --trace and is mentioned only in condition added there. Repository: rL LLVM http://reviews.llvm.org/D20464 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.
Eugene.Zelenko added a comment. As fas as I could judge from log, you built LLDB with LLVM/Clang. But problem happens when it's necessary to build LLDB separately from LLVM/Clang (standalone build). Repository: rL LLVM http://reviews.llvm.org/D20464 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20464: [LLDB][MIPS] Check if libatomic needs to be specified explicitly.
Eugene.Zelenko added a comment. > Then we need to introduce a 64 bit atomic check in > cmake/modules/LLDBStandalone.cmake. What do you think? > > Thanks I think this should be right solution. Repository: rL LLVM http://reviews.llvm.org/D20464 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: include/lldb/Host/Editline.h:289 @@ +288,3 @@ +unsigned char +EndOrAddLineCommand (int ch); + Will be good idea to not add space between name and arguments list in new code. Same for other places. Repository: rL LLVM http://reviews.llvm.org/D22284 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D22322: [LLDB] Fixes for standalone build
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: labath, zturner, nitesh.jain. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. This patch include two fixes: * include CheckAtomic to set HAVE_CXX_ATOMICS64_WITHOUT_LIB properly (introduced in r274121) * hint Clang CMake files for LLVM CMake files location (inctroduced in ~ r274176) Repository: rL LLVM http://reviews.llvm.org/D22322 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -58,6 +58,7 @@ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree") set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") @@ -85,6 +86,7 @@ include(AddLLVM) include(HandleLLVMOptions) + include(CheckAtomic) if (PYTHON_EXECUTABLE STREQUAL "") set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -58,6 +58,7 @@ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree") set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") @@ -85,6 +86,7 @@ include(AddLLVM) include(HandleLLVMOptions) + include(CheckAtomic) if (PYTHON_EXECUTABLE STREQUAL "") set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22322: [LLDB] Fixes for standalone build
Eugene.Zelenko updated this revision to Diff 64000. Eugene.Zelenko added a comment. Improved description, but in generic terms, since two files are needed. Repository: rL LLVM https://reviews.llvm.org/D22322 Files: cmake/modules/LLDBStandalone.cmake Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -58,6 +58,7 @@ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files") set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") @@ -85,6 +86,7 @@ include(AddLLVM) include(HandleLLVMOptions) + include(CheckAtomic) if (PYTHON_EXECUTABLE STREQUAL "") set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) Index: cmake/modules/LLDBStandalone.cmake === --- cmake/modules/LLDBStandalone.cmake +++ cmake/modules/LLDBStandalone.cmake @@ -58,6 +58,7 @@ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files") set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") @@ -85,6 +86,7 @@ include(AddLLVM) include(HandleLLVMOptions) + include(CheckAtomic) if (PYTHON_EXECUTABLE STREQUAL "") set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)
Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in r275482. Please mention URL of Differential revision to close it automatically after commit. https://reviews.llvm.org/D22284 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D22284: [LLDB] Proposed change in multi-line edit behavior (Return = end/append, Meta+Return = line break)
Eugene.Zelenko added a comment. Sorry, forgot to add "[revision] in commit summary". https://reviews.llvm.org/D22284 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [lldb] r275641 - Fixes for standalone build:
Author: eugenezelenko Date: Fri Jul 15 17:46:15 2016 New Revision: 275641 URL: http://llvm.org/viewvc/llvm-project?rev=275641&view=rev Log: Fixes for standalone build: * include CheckAtomic to set HAVE_CXX_ATOMICS64_WITHOUT_LIB properly (introduced in r274121) * hint Clang CMake files for LLVM CMake files location (inctroduced in ~ r274176) Differential revision: https://reviews.llvm.org/D22322 Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=275641&r1=275640&r2=275641&view=diff == --- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original) +++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Fri Jul 15 17:46:15 2016 @@ -58,6 +58,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin") set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib") set(LLVM_MAIN_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include") + set(LLVM_DIR ${LLVM_OBJ_ROOT}/cmake/modules/CMakeFiles CACHE PATH "Path to LLVM build tree CMake files") set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree") set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree") @@ -85,6 +86,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR include(AddLLVM) include(HandleLLVMOptions) + include(CheckAtomic) if (PYTHON_EXECUTABLE STREQUAL "") set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 3.2 3.1 3.0 2.7 2.6 2.5) ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D20436: Clean up vestigial remnants of locking primitives
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. I think will be good idea to try to commit these changes before 3.9 branching. Repository: rL LLVM https://reviews.llvm.org/D20436 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D23881: cmake: Add local module directory to search path for standalone build
Eugene.Zelenko added a comment. I think will be better to use LLVM_MAIN_SRC_DIR. https://reviews.llvm.org/D23881 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24251: LLDB: API for Permission of object file's sections
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please rebase code on trunk and run Clang-format. https://reviews.llvm.org/D24251 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D24251: LLDB: API for Permission of object file's sections
Eugene.Zelenko added inline comments. Comment at: source/API/SBSection.cpp:257 @@ +256,3 @@ +SectionSP section_sp(GetSP()); +if (section_sp.get()) +return section_sp->GetPermissions(); You don't need to use get(), because smart pointers have http://en.cppreference.com/w/cpp/memory/shared_ptr/operator_bool. Will be good idea to remove it in other conditions in this file. https://reviews.llvm.org/D24251 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D24694: [LLDB] Fix Clang initialization and Clang-tidy modernize-use-nullptr warnings
Eugene.Zelenko created this revision. Eugene.Zelenko added reviewers: labath, zturner. Eugene.Zelenko added a subscriber: lldb-commits. Eugene.Zelenko set the repository for this revision to rL LLVM. Looks like RegisterContextNetBSD_x86_64.cpp should use RegisterInfos_x86_64.h as much as possible, but I think will be good idea if platform maintainer will take care about this. Repository: rL LLVM https://reviews.llvm.org/D24694 Files: source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp source/Plugins/Process/Utility/RegisterInfos_i386.h source/Plugins/Process/Utility/RegisterInfos_x86_64.h Index: source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp === --- source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp +++ source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp @@ -1,15 +1,16 @@ -//===-- RegisterContextNetBSD_x86_64.cpp --*- C++ -*-===// +//===-- RegisterContextNetBSD_x86_64.cpp *- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===-===// +//===--===// +#include #include -#include +#include "llvm/ADT/Triple.h" #include "llvm/Support/Compiler.h" #include "RegisterContextNetBSD_x86_64.h" @@ -89,10 +90,10 @@ LLVM_EXTENSION offsetof(XSAVE, ymmh[0]) + (32 * reg_index)) // Number of bytes needed to represent a FPR. -#define FPR_SIZE(reg) sizeof(((FXSAVE *)NULL)->reg) +#define FPR_SIZE(reg) sizeof(((FXSAVE *)nullptr)->reg) // Number of bytes needed to represent the i'th FP register. -#define FP_SIZE sizeof(((MMSReg *)NULL)->bytes) +#define FP_SIZE sizeof(((MMSReg *)nullptr)->bytes) // Number of bytes needed to represent an XMM register. #define XMM_SIZE sizeof(XMMReg) @@ -105,101 +106,106 @@ // Note that the size and offset will be updated by platform-specific classes. #define DEFINE_GPR(reg, alt, kind1, kind2, kind3, kind4) \ {\ -#reg, alt, sizeof(((GPR *) NULL)->reg),\ +#reg, alt, sizeof(((GPR *)nullptr)->reg), \ GPR_OFFSET(reg), eEncodingUint, eFormatHex, \ {kind1, kind2, kind3, kind4, \ lldb_##reg##_x86_64 }, \ - NULL, NULL \ + nullptr, nullptr, nullptr, 0 \ } #define DEFINE_FPR(name, reg, kind1, kind2, kind3, kind4) \ {\ -#name, NULL, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, eFormatHex,\ +#name, nullptr, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, eFormatHex, \ {kind1, kind2, kind3, kind4,\ lldb_##name##_x86_64 },\ -NULL, NULL \ +nullptr, nullptr, nullptr, 0 \ } #define DEFINE_FP_ST(reg, i) \ {\ -#reg #i, NULL, FP_SIZE,\ +#reg #i, nullptr, FP_SIZE, \ LLVM_EXTENSION FPR_OFFSET( \ stmm[i]), eEncodingVector, eFormatVectorOfUInt8, \ {dwarf_st##i##_x86_64, dwarf_st##i##_x86_64, LLDB_INVALID_REGNUM, \ LLDB_INVALID_REGNUM, lldb_st##i##_x86_64 }, \ - NULL, NULL\ + nullptr, nullptr, nullptr, 0 \ } #define DEFINE_FP_MM(reg, i) \ {\ -#reg #i, NULL, sizeof(uint64_t), \ +#reg #i, nullptr, sizeof(uint64_t),\ LLVM_EXTENSION FPR_OFFSET( \ stmm[i]), eEncodingUint, eFormatHex, \ {dwarf_mm##i##_x86_64, dwarf_mm##i##_x86_64, \
Re: [Lldb-commits] [PATCH] D22831: [LLDB] Documentation for SBAddress class
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please rebase from trunk and run Clang-format. Repository: rL LLVM https://reviews.llvm.org/D22831 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D23948: Remove unused variable
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in r280283. https://reviews.llvm.org/D23948 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D23950: Remove unused local variable
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in r280283. https://reviews.llvm.org/D23950 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D23951: Remove unused any_found local variable
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in r280283. https://reviews.llvm.org/D23951 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D23952: Remove unused frame_zero_id local variable
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko closed this revision. Eugene.Zelenko added a comment. Committed in r280283. https://reviews.llvm.org/D23952 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits