[lldb] NFC remove DISALLOW_COPY_AND_ASSIGN

Summary:
This is how I applied my clang-tidy check (see
https://reviews.llvm.org/D80531) in order to remove
`DISALLOW_COPY_AND_ASSIGN` and have deleted copy ctors and deleted
assignment operators instead.

```
lang=bash
grep DISALLOW_COPY_AND_ASSIGN /opt/notnfs/kkleine/llvm/lldb -r -l | sort | uniq > files

for i in $(cat files);
do
  clang-tidy \
    --checks="-*,modernize-replace-disallow-copy-and-assign-macro" \
    --format-style=LLVM \
    --header-filter=.* \
    --fix \
    -fix-errors \
    $i;
done
```

Reviewers: espindola, labath, aprantl, teemperor

Reviewed By: labath, aprantl, teemperor

Subscribers: teemperor, aprantl, labath, emaste, sbc100, aheejin, MaskRay, arphaman, usaxena95, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D80543
This commit is contained in:
Konrad Kleine 2020-06-02 12:19:55 -04:00
parent 170b6869b5
commit eaebcbc679
205 changed files with 591 additions and 271 deletions

View File

@ -68,13 +68,6 @@
#include <unistd.h>
#include <vector>
/// \def DISALLOW_COPY_AND_ASSIGN(TypeName)
/// Macro definition for easily disallowing copy constructor and
/// assignment operators in C++ classes.
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName &); \
const TypeName &operator=(const TypeName &)
extern "C" {
int accept$NOCANCEL(int, struct sockaddr *__restrict, socklen_t *__restrict);
int close$NOCANCEL(int);
@ -135,7 +128,8 @@ protected:
char *m_str;
private:
DISALLOW_COPY_AND_ASSIGN(String);
String(const String &) = delete;
const String &operator=(const String &) = delete;
};
// Type definitions

View File

@ -72,7 +72,8 @@ public:
void *callback_baton);
private:
DISALLOW_COPY_AND_ASSIGN(SBCommunication);
SBCommunication(const SBCommunication &) = delete;
const SBCommunication &operator=(const SBCommunication &) = delete;
lldb_private::Communication *m_opaque;
bool m_opaque_owned;

View File

@ -101,7 +101,8 @@ protected:
lldb_private::Stream &ref();
private:
DISALLOW_COPY_AND_ASSIGN(SBStream);
SBStream(const SBStream &) = delete;
const SBStream &operator=(const SBStream &) = delete;
std::unique_ptr<lldb_private::Stream> m_opaque_up;
bool m_is_file;
};

View File

@ -137,7 +137,8 @@ public:
lldb::BreakpointSP m_new_breakpoint_sp;
BreakpointLocationCollection m_locations;
DISALLOW_COPY_AND_ASSIGN(BreakpointEventData);
BreakpointEventData(const BreakpointEventData &) = delete;
const BreakpointEventData &operator=(const BreakpointEventData &) = delete;
};
// Saving & restoring breakpoints:
@ -669,7 +670,8 @@ private:
void SendBreakpointChangedEvent(BreakpointEventData *data);
DISALLOW_COPY_AND_ASSIGN(Breakpoint);
Breakpoint(const Breakpoint &) = delete;
const Breakpoint &operator=(const Breakpoint &) = delete;
};
} // namespace lldb_private

View File

@ -68,7 +68,8 @@ private:
BreakpointIDArray m_breakpoint_ids;
BreakpointID m_invalid_id;
DISALLOW_COPY_AND_ASSIGN(BreakpointIDList);
BreakpointIDList(const BreakpointIDList &) = delete;
const BreakpointIDList &operator=(const BreakpointIDList &) = delete;
};
} // namespace lldb_private

View File

@ -168,7 +168,8 @@ public:
}
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointList);
BreakpointList(const BreakpointList &) = delete;
const BreakpointList &operator=(const BreakpointList &) = delete;
};
} // namespace lldb_private

View File

@ -345,7 +345,8 @@ private:
void SendBreakpointLocationChangedEvent(lldb::BreakpointEventType eventKind);
DISALLOW_COPY_AND_ASSIGN(BreakpointLocation);
BreakpointLocation(const BreakpointLocation &) = delete;
const BreakpointLocation &operator=(const BreakpointLocation &) = delete;
};
} // namespace lldb_private

View File

@ -222,7 +222,8 @@ private:
// Subclass identifier (for llvm isa/dyn_cast)
const unsigned char SubclassID;
DISALLOW_COPY_AND_ASSIGN(BreakpointResolver);
BreakpointResolver(const BreakpointResolver &) = delete;
const BreakpointResolver &operator=(const BreakpointResolver &) = delete;
};
} // namespace lldb_private

View File

@ -71,7 +71,9 @@ protected:
// to a Section+Offset address in this module, whenever that module gets
// around to being loaded.
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverAddress);
BreakpointResolverAddress(const BreakpointResolverAddress &) = delete;
const BreakpointResolverAddress &
operator=(const BreakpointResolverAddress &) = delete;
};
} // namespace lldb_private

View File

@ -69,7 +69,9 @@ protected:
bool m_exact_match;
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileLine);
BreakpointResolverFileLine(const BreakpointResolverFileLine &) = delete;
const BreakpointResolverFileLine &
operator=(const BreakpointResolverFileLine &) = delete;
};
} // namespace lldb_private

View File

@ -70,7 +70,9 @@ protected:
// comp_unit passed in.
private:
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverFileRegex);
BreakpointResolverFileRegex(const BreakpointResolverFileRegex &) = delete;
const BreakpointResolverFileRegex &
operator=(const BreakpointResolverFileRegex &) = delete;
};
} // namespace lldb_private

View File

@ -70,7 +70,9 @@ private:
// SBStructuredData).
StructuredData::GenericSP m_implementation_sp;
DISALLOW_COPY_AND_ASSIGN(BreakpointResolverScripted);
BreakpointResolverScripted(const BreakpointResolverScripted &) = delete;
const BreakpointResolverScripted &
operator=(const BreakpointResolverScripted &) = delete;
};
} // namespace lldb_private

View File

@ -225,7 +225,8 @@ private:
const lldb::BreakpointLocationSP &owner, lldb::addr_t m_addr,
bool use_hardware);
DISALLOW_COPY_AND_ASSIGN(BreakpointSite);
BreakpointSite(const BreakpointSite &) = delete;
const BreakpointSite &operator=(const BreakpointSite &) = delete;
};
} // namespace lldb_private

View File

@ -37,7 +37,8 @@ protected:
private:
// For Stoppoint only
DISALLOW_COPY_AND_ASSIGN(Stoppoint);
Stoppoint(const Stoppoint &) = delete;
const Stoppoint &operator=(const Stoppoint &) = delete;
};
} // namespace lldb_private

View File

@ -77,7 +77,8 @@ protected:
private:
// For StoppointLocation only
DISALLOW_COPY_AND_ASSIGN(StoppointLocation);
StoppointLocation(const StoppointLocation &) = delete;
const StoppointLocation &operator=(const StoppointLocation &) = delete;
StoppointLocation() = delete;
};

View File

@ -54,7 +54,8 @@ public:
lldb::WatchpointEventType m_watchpoint_event;
lldb::WatchpointSP m_new_watchpoint_sp;
DISALLOW_COPY_AND_ASSIGN(WatchpointEventData);
WatchpointEventData(const WatchpointEventData &) = delete;
const WatchpointEventData &operator=(const WatchpointEventData &) = delete;
};
Watchpoint(Target &target, lldb::addr_t addr, uint32_t size,
@ -204,7 +205,8 @@ private:
void SendWatchpointChangedEvent(WatchpointEventData *data);
DISALLOW_COPY_AND_ASSIGN(Watchpoint);
Watchpoint(const Watchpoint &) = delete;
const Watchpoint &operator=(const Watchpoint &) = delete;
};
} // namespace lldb_private

View File

@ -55,7 +55,8 @@ protected:
std::vector<AddressRange> m_address_ranges;
private:
DISALLOW_COPY_AND_ASSIGN(AddressResolver);
AddressResolver(const AddressResolver &) = delete;
const AddressResolver &operator=(const AddressResolver &) = delete;
};
} // namespace lldb_private

View File

@ -48,7 +48,9 @@ protected:
// functions or not.
private:
DISALLOW_COPY_AND_ASSIGN(AddressResolverFileLine);
AddressResolverFileLine(const AddressResolverFileLine &) = delete;
const AddressResolverFileLine &
operator=(const AddressResolverFileLine &) = delete;
};
} // namespace lldb_private

View File

@ -54,7 +54,8 @@ protected:
AddressResolver::MatchType m_match_type;
private:
DISALLOW_COPY_AND_ASSIGN(AddressResolverName);
AddressResolverName(const AddressResolverName &) = delete;
const AddressResolverName &operator=(const AddressResolverName &) = delete;
};
} // namespace lldb_private

View File

@ -359,7 +359,8 @@ protected:
size_t GetCachedBytes(void *dst, size_t dst_len);
private:
DISALLOW_COPY_AND_ASSIGN(Communication);
Communication(const Communication &) = delete;
const Communication &operator=(const Communication &) = delete;
};
} // namespace lldb_private

View File

@ -443,7 +443,8 @@ private:
// object
Debugger(lldb::LogOutputCallback m_log_callback, void *baton);
DISALLOW_COPY_AND_ASSIGN(Debugger);
Debugger(const Debugger &) = delete;
const Debugger &operator=(const Debugger &) = delete;
};
} // namespace lldb_private

View File

@ -349,7 +349,8 @@ public:
protected:
std::string m_description;
DISALLOW_COPY_AND_ASSIGN(PseudoInstruction);
PseudoInstruction(const PseudoInstruction &) = delete;
const PseudoInstruction &operator=(const PseudoInstruction &) = delete;
};
class Disassembler : public std::enable_shared_from_this<Disassembler>,
@ -520,7 +521,8 @@ protected:
private:
// For Disassembler only
DISALLOW_COPY_AND_ASSIGN(Disassembler);
Disassembler(const Disassembler &) = delete;
const Disassembler &operator=(const Disassembler &) = delete;
};
} // namespace lldb_private

View File

@ -499,7 +499,8 @@ protected:
private:
// For EmulateInstruction only
DISALLOW_COPY_AND_ASSIGN(EmulateInstruction);
EmulateInstruction(const EmulateInstruction &) = delete;
const EmulateInstruction &operator=(const EmulateInstruction &) = delete;
};
} // namespace lldb_private

View File

@ -58,7 +58,8 @@ protected:
// functions or not.
private:
DISALLOW_COPY_AND_ASSIGN(FileLineResolver);
FileLineResolver(const FileLineResolver &) = delete;
const FileLineResolver &operator=(const FileLineResolver &) = delete;
};
} // namespace lldb_private

View File

@ -91,7 +91,8 @@ class Highlighter {
public:
Highlighter() = default;
virtual ~Highlighter() = default;
DISALLOW_COPY_AND_ASSIGN(Highlighter);
Highlighter(const Highlighter &) = delete;
const Highlighter &operator=(const Highlighter &) = delete;
/// Returns a human readable name for the selected highlighter.
virtual llvm::StringRef GetName() const = 0;

View File

@ -180,7 +180,8 @@ protected:
bool m_active;
private:
DISALLOW_COPY_AND_ASSIGN(IOHandler);
IOHandler(const IOHandler &) = delete;
const IOHandler &operator=(const IOHandler &) = delete;
};
/// A delegate class for use with IOHandler subclasses.
@ -544,7 +545,8 @@ protected:
IOHandler *m_top = nullptr;
private:
DISALLOW_COPY_AND_ASSIGN(IOHandlerStack);
IOHandlerStack(const IOHandlerStack &) = delete;
const IOHandlerStack &operator=(const IOHandlerStack &) = delete;
};
} // namespace lldb_private

View File

@ -1049,7 +1049,8 @@ private:
llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
TypeMap &types);
DISALLOW_COPY_AND_ASSIGN(Module);
Module(const Module &) = delete;
const Module &operator=(const Module &) = delete;
};
} // namespace lldb_private

View File

@ -268,7 +268,8 @@ protected:
// This is specified as
// as a multiple number of a host bytes
private:
DISALLOW_COPY_AND_ASSIGN(Section);
Section(const Section &) = delete;
const Section &operator=(const Section &) = delete;
};
} // namespace lldb_private

View File

@ -160,7 +160,8 @@ protected:
lldb::DebuggerWP m_debugger_wp;
private:
DISALLOW_COPY_AND_ASSIGN(SourceManager);
SourceManager(const SourceManager &) = delete;
const SourceManager &operator=(const SourceManager &) = delete;
};
bool operator==(const SourceManager::File &lhs, const SourceManager::File &rhs);

View File

@ -48,7 +48,8 @@ protected:
size_t WriteImpl(const void *s, size_t length) override;
private:
DISALLOW_COPY_AND_ASSIGN(StreamFile);
StreamFile(const StreamFile &) = delete;
const StreamFile &operator=(const StreamFile &) = delete;
};
} // namespace lldb_private

View File

@ -53,7 +53,8 @@ private:
mutable std::recursive_mutex m_mutex;
// For ThreadSafeValue only
DISALLOW_COPY_AND_ASSIGN(ThreadSafeValue);
ThreadSafeValue(const ThreadSafeValue &) = delete;
const ThreadSafeValue &operator=(const ThreadSafeValue &) = delete;
};
} // namespace lldb_private

View File

@ -974,7 +974,8 @@ private:
const GetValueForExpressionPathOptions &options,
ExpressionPathAftermath *final_task_on_target);
DISALLOW_COPY_AND_ASSIGN(ValueObject);
ValueObject(const ValueObject &) = delete;
const ValueObject &operator=(const ValueObject &) = delete;
};
// A value object manager class that is seeded with the static variable value

View File

@ -57,7 +57,8 @@ protected:
CompilerType m_cast_type;
private:
DISALLOW_COPY_AND_ASSIGN(ValueObjectCast);
ValueObjectCast(const ValueObjectCast &) = delete;
const ValueObjectCast &operator=(const ValueObjectCast &) = delete;
};
} // namespace lldb_private

View File

@ -88,7 +88,8 @@ protected:
AddressType child_ptr_or_ref_addr_type,
uint64_t language_flags);
DISALLOW_COPY_AND_ASSIGN(ValueObjectChild);
ValueObjectChild(const ValueObjectChild &) = delete;
const ValueObjectChild &operator=(const ValueObjectChild &) = delete;
};
} // namespace lldb_private

View File

@ -150,7 +150,9 @@ private:
ValueObjectConstResult(ExecutionContextScope *exe_scope,
ValueObjectManager &manager, const Status &error);
DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResult);
ValueObjectConstResult(const ValueObjectConstResult &) = delete;
const ValueObjectConstResult &
operator=(const ValueObjectConstResult &) = delete;
};
} // namespace lldb_private

View File

@ -61,7 +61,9 @@ private:
friend class ValueObjectConstResult;
friend class ValueObjectConstResultImpl;
DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultCast);
ValueObjectConstResultCast(const ValueObjectConstResultCast &) = delete;
const ValueObjectConstResultCast &
operator=(const ValueObjectConstResultCast &) = delete;
};
} // namespace lldb_private

View File

@ -70,7 +70,9 @@ private:
friend class ValueObjectConstResult;
friend class ValueObjectConstResultImpl;
DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultChild);
ValueObjectConstResultChild(const ValueObjectConstResultChild &) = delete;
const ValueObjectConstResultChild &
operator=(const ValueObjectConstResultChild &) = delete;
};
} // namespace lldb_private

View File

@ -71,7 +71,9 @@ private:
lldb::ValueObjectSP m_load_addr_backend;
lldb::ValueObjectSP m_address_of_backend;
DISALLOW_COPY_AND_ASSIGN(ValueObjectConstResultImpl);
ValueObjectConstResultImpl(const ValueObjectConstResultImpl &) = delete;
const ValueObjectConstResultImpl &
operator=(const ValueObjectConstResultImpl &) = delete;
};
} // namespace lldb_private

View File

@ -127,7 +127,9 @@ private:
ValueObjectDynamicValue(ValueObject &parent,
lldb::DynamicValueType use_dynamic);
DISALLOW_COPY_AND_ASSIGN(ValueObjectDynamicValue);
ValueObjectDynamicValue(const ValueObjectDynamicValue &) = delete;
const ValueObjectDynamicValue &
operator=(const ValueObjectDynamicValue &) = delete;
};
} // namespace lldb_private

View File

@ -72,7 +72,8 @@ private:
ValueObjectManager &manager, llvm::StringRef name,
const Address &address, const CompilerType &ast_type);
// For ValueObject only
DISALLOW_COPY_AND_ASSIGN(ValueObjectMemory);
ValueObjectMemory(const ValueObjectMemory &) = delete;
const ValueObjectMemory &operator=(const ValueObjectMemory &) = delete;
};
} // namespace lldb_private

View File

@ -73,7 +73,9 @@ private:
lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx);
// For ValueObject only
DISALLOW_COPY_AND_ASSIGN(ValueObjectRegisterSet);
ValueObjectRegisterSet(const ValueObjectRegisterSet &) = delete;
const ValueObjectRegisterSet &
operator=(const ValueObjectRegisterSet &) = delete;
};
class ValueObjectRegister : public ValueObject {
@ -128,7 +130,8 @@ private:
lldb::RegisterContextSP &reg_ctx_sp, uint32_t reg_num);
// For ValueObject only
DISALLOW_COPY_AND_ASSIGN(ValueObjectRegister);
ValueObjectRegister(const ValueObjectRegister &) = delete;
const ValueObjectRegister &operator=(const ValueObjectRegister &) = delete;
};
} // namespace lldb_private

View File

@ -164,7 +164,8 @@ private:
void CopyValueData(ValueObject *source);
DISALLOW_COPY_AND_ASSIGN(ValueObjectSynthetic);
ValueObjectSynthetic(const ValueObjectSynthetic &) = delete;
const ValueObjectSynthetic &operator=(const ValueObjectSynthetic &) = delete;
};
} // namespace lldb_private

View File

@ -80,7 +80,8 @@ private:
ValueObjectManager &manager,
const lldb::VariableSP &var_sp);
// For ValueObject only
DISALLOW_COPY_AND_ASSIGN(ValueObjectVariable);
ValueObjectVariable(const ValueObjectVariable &) = delete;
const ValueObjectVariable &operator=(const ValueObjectVariable &) = delete;
};
} // namespace lldb_private

View File

@ -152,7 +152,9 @@ private:
TypeOrName m_type;
private:
DISALLOW_COPY_AND_ASSIGN(TypeNameSpecifierImpl);
TypeNameSpecifierImpl(const TypeNameSpecifierImpl &) = delete;
const TypeNameSpecifierImpl &
operator=(const TypeNameSpecifierImpl &) = delete;
};
} // namespace lldb_private

View File

@ -218,7 +218,8 @@ protected:
BackEndType m_format_map;
std::string m_name;
DISALLOW_COPY_AND_ASSIGN(FormattersContainer);
FormattersContainer(const FormattersContainer &) = delete;
const FormattersContainer &operator=(const FormattersContainer &) = delete;
void Add_Impl(MapKeyType type, const MapValueType &entry,
RegularExpression *dummy) {

View File

@ -152,7 +152,8 @@ protected:
uint32_t m_my_revision;
private:
DISALLOW_COPY_AND_ASSIGN(TypeFormatImpl);
TypeFormatImpl(const TypeFormatImpl &) = delete;
const TypeFormatImpl &operator=(const TypeFormatImpl &) = delete;
};
class TypeFormatImpl_Format : public TypeFormatImpl {
@ -180,7 +181,9 @@ protected:
lldb::Format m_format;
private:
DISALLOW_COPY_AND_ASSIGN(TypeFormatImpl_Format);
TypeFormatImpl_Format(const TypeFormatImpl_Format &) = delete;
const TypeFormatImpl_Format &
operator=(const TypeFormatImpl_Format &) = delete;
};
class TypeFormatImpl_EnumType : public TypeFormatImpl {
@ -209,7 +212,9 @@ protected:
mutable std::unordered_map<void *, CompilerType> m_types;
private:
DISALLOW_COPY_AND_ASSIGN(TypeFormatImpl_EnumType);
TypeFormatImpl_EnumType(const TypeFormatImpl_EnumType &) = delete;
const TypeFormatImpl_EnumType &
operator=(const TypeFormatImpl_EnumType &) = delete;
};
} // namespace lldb_private

View File

@ -270,7 +270,8 @@ protected:
private:
Kind m_kind;
DISALLOW_COPY_AND_ASSIGN(TypeSummaryImpl);
TypeSummaryImpl(const TypeSummaryImpl &) = delete;
const TypeSummaryImpl &operator=(const TypeSummaryImpl &) = delete;
};
// simple string-based summaries, using ${var to show data
@ -297,7 +298,8 @@ struct StringSummaryFormat : public TypeSummaryImpl {
}
private:
DISALLOW_COPY_AND_ASSIGN(StringSummaryFormat);
StringSummaryFormat(const StringSummaryFormat &) = delete;
const StringSummaryFormat &operator=(const StringSummaryFormat &) = delete;
};
// summaries implemented via a C++ function
@ -341,7 +343,9 @@ struct CXXFunctionSummaryFormat : public TypeSummaryImpl {
typedef std::shared_ptr<CXXFunctionSummaryFormat> SharedPointer;
private:
DISALLOW_COPY_AND_ASSIGN(CXXFunctionSummaryFormat);
CXXFunctionSummaryFormat(const CXXFunctionSummaryFormat &) = delete;
const CXXFunctionSummaryFormat &
operator=(const CXXFunctionSummaryFormat &) = delete;
};
// Python-based summaries, running script code to show data
@ -387,7 +391,8 @@ struct ScriptSummaryFormat : public TypeSummaryImpl {
typedef std::shared_ptr<ScriptSummaryFormat> SharedPointer;
private:
DISALLOW_COPY_AND_ASSIGN(ScriptSummaryFormat);
ScriptSummaryFormat(const ScriptSummaryFormat &) = delete;
const ScriptSummaryFormat &operator=(const ScriptSummaryFormat &) = delete;
};
} // namespace lldb_private

View File

@ -96,7 +96,9 @@ protected:
private:
bool m_valid;
DISALLOW_COPY_AND_ASSIGN(SyntheticChildrenFrontEnd);
SyntheticChildrenFrontEnd(const SyntheticChildrenFrontEnd &) = delete;
const SyntheticChildrenFrontEnd &
operator=(const SyntheticChildrenFrontEnd &) = delete;
};
class SyntheticValueProviderFrontEnd : public SyntheticChildrenFrontEnd {
@ -121,7 +123,10 @@ public:
lldb::ValueObjectSP GetSyntheticValue() override = 0;
private:
DISALLOW_COPY_AND_ASSIGN(SyntheticValueProviderFrontEnd);
SyntheticValueProviderFrontEnd(const SyntheticValueProviderFrontEnd &) =
delete;
const SyntheticValueProviderFrontEnd &
operator=(const SyntheticValueProviderFrontEnd &) = delete;
};
class SyntheticChildren {
@ -265,7 +270,8 @@ protected:
Flags m_flags;
private:
DISALLOW_COPY_AND_ASSIGN(SyntheticChildren);
SyntheticChildren(const SyntheticChildren &) = delete;
const SyntheticChildren &operator=(const SyntheticChildren &) = delete;
};
class TypeFilterImpl : public SyntheticChildren {
@ -333,7 +339,8 @@ public:
private:
TypeFilterImpl *filter;
DISALLOW_COPY_AND_ASSIGN(FrontEnd);
FrontEnd(const FrontEnd &) = delete;
const FrontEnd &operator=(const FrontEnd &) = delete;
};
SyntheticChildrenFrontEnd::AutoPointer
@ -344,7 +351,8 @@ public:
typedef std::shared_ptr<TypeFilterImpl> SharedPointer;
private:
DISALLOW_COPY_AND_ASSIGN(TypeFilterImpl);
TypeFilterImpl(const TypeFilterImpl &) = delete;
const TypeFilterImpl &operator=(const TypeFilterImpl &) = delete;
};
class CXXSyntheticChildren : public SyntheticChildren {
@ -372,7 +380,8 @@ protected:
std::string m_description;
private:
DISALLOW_COPY_AND_ASSIGN(CXXSyntheticChildren);
CXXSyntheticChildren(const CXXSyntheticChildren &) = delete;
const CXXSyntheticChildren &operator=(const CXXSyntheticChildren &) = delete;
};
class ScriptedSyntheticChildren : public SyntheticChildren {
@ -435,7 +444,8 @@ public:
StructuredData::ObjectSP m_wrapper_sp;
ScriptInterpreter *m_interpreter;
DISALLOW_COPY_AND_ASSIGN(FrontEnd);
FrontEnd(const FrontEnd &) = delete;
const FrontEnd &operator=(const FrontEnd &) = delete;
};
SyntheticChildrenFrontEnd::AutoPointer
@ -448,7 +458,9 @@ public:
}
private:
DISALLOW_COPY_AND_ASSIGN(ScriptedSyntheticChildren);
ScriptedSyntheticChildren(const ScriptedSyntheticChildren &) = delete;
const ScriptedSyntheticChildren &
operator=(const ScriptedSyntheticChildren &) = delete;
};
} // namespace lldb_private

View File

@ -141,7 +141,8 @@ private:
friend struct StringSummaryFormat;
DISALLOW_COPY_AND_ASSIGN(ValueObjectPrinter);
ValueObjectPrinter(const ValueObjectPrinter &) = delete;
const ValueObjectPrinter &operator=(const ValueObjectPrinter &) = delete;
};
} // namespace lldb_private

View File

@ -107,7 +107,8 @@ private:
size_t size, uint32_t permissions, uint8_t alignment,
AllocationPolicy m_policy);
DISALLOW_COPY_AND_ASSIGN(Allocation);
Allocation(const Allocation &) = delete;
const Allocation &operator=(const Allocation &) = delete;
};
static_assert(sizeof(Allocation) <=

View File

@ -367,7 +367,8 @@ protected:
void CalculateInteractiveAndTerminal();
private:
DISALLOW_COPY_AND_ASSIGN(File);
File(const File &) = delete;
const File &operator=(const File &) = delete;
};
class NativeFile : public File {
@ -428,7 +429,8 @@ protected:
std::mutex offset_access_mutex;
private:
DISALLOW_COPY_AND_ASSIGN(NativeFile);
NativeFile(const NativeFile &) = delete;
const NativeFile &operator=(const NativeFile &) = delete;
};
} // namespace lldb_private

View File

@ -19,7 +19,9 @@ namespace lldb_private {
class HostThread;
class HostNativeProcessBase {
DISALLOW_COPY_AND_ASSIGN(HostNativeProcessBase);
HostNativeProcessBase(const HostNativeProcessBase &) = delete;
const HostNativeProcessBase &
operator=(const HostNativeProcessBase &) = delete;
public:
HostNativeProcessBase() : m_process(LLDB_INVALID_PROCESS) {}

View File

@ -23,7 +23,8 @@ namespace lldb_private {
class HostNativeThreadBase {
friend class ThreadLauncher;
DISALLOW_COPY_AND_ASSIGN(HostNativeThreadBase);
HostNativeThreadBase(const HostNativeThreadBase &) = delete;
const HostNativeThreadBase &operator=(const HostNativeThreadBase &) = delete;
public:
HostNativeThreadBase();

View File

@ -86,7 +86,8 @@ private:
int m_signo;
friend class MainLoop;
DISALLOW_COPY_AND_ASSIGN(SignalHandle);
SignalHandle(const SignalHandle &) = delete;
const SignalHandle &operator=(const SignalHandle &) = delete;
};
struct SignalInfo {

View File

@ -75,11 +75,13 @@ private:
IOObject::WaitableHandle m_handle;
friend class MainLoopBase;
DISALLOW_COPY_AND_ASSIGN(ReadHandle);
ReadHandle(const ReadHandle &) = delete;
const ReadHandle &operator=(const ReadHandle &) = delete;
};
private:
DISALLOW_COPY_AND_ASSIGN(MainLoopBase);
MainLoopBase(const MainLoopBase &) = delete;
const MainLoopBase &operator=(const MainLoopBase &) = delete;
};
} // namespace lldb_private

View File

@ -67,7 +67,8 @@ public:
ProcessRunLock *m_lock;
private:
DISALLOW_COPY_AND_ASSIGN(ProcessRunLocker);
ProcessRunLocker(const ProcessRunLocker &) = delete;
const ProcessRunLocker &operator=(const ProcessRunLocker &) = delete;
};
protected:
@ -75,7 +76,8 @@ protected:
bool m_running;
private:
DISALLOW_COPY_AND_ASSIGN(ProcessRunLock);
ProcessRunLock(const ProcessRunLock &) = delete;
const ProcessRunLock &operator=(const ProcessRunLock &) = delete;
};
} // namespace lldb_private

View File

@ -209,7 +209,8 @@ protected:
int m_slave_fd; ///< The file descriptor for the slave.
private:
DISALLOW_COPY_AND_ASSIGN(PseudoTerminal);
PseudoTerminal(const PseudoTerminal &) = delete;
const PseudoTerminal &operator=(const PseudoTerminal &) = delete;
};
} // namespace lldb_private

View File

@ -170,7 +170,9 @@ protected:
private:
// For RegisterContext only
DISALLOW_COPY_AND_ASSIGN(NativeRegisterContext);
NativeRegisterContext(const NativeRegisterContext &) = delete;
const NativeRegisterContext &
operator=(const NativeRegisterContext &) = delete;
};
} // namespace lldb_private

View File

@ -116,7 +116,9 @@ protected:
private:
void InitializeSocket(Socket *socket);
DISALLOW_COPY_AND_ASSIGN(ConnectionFileDescriptor);
ConnectionFileDescriptor(const ConnectionFileDescriptor &) = delete;
const ConnectionFileDescriptor &
operator=(const ConnectionFileDescriptor &) = delete;
};
} // namespace lldb_private

View File

@ -14,7 +14,8 @@
namespace lldb_private {
class HostThreadPosix : public HostNativeThreadBase {
DISALLOW_COPY_AND_ASSIGN(HostThreadPosix);
HostThreadPosix(const HostThreadPosix &) = delete;
const HostThreadPosix &operator=(const HostThreadPosix &) = delete;
public:
HostThreadPosix();

View File

@ -56,7 +56,9 @@ private:
std::string m_uri;
DISALLOW_COPY_AND_ASSIGN(ConnectionGenericFile);
ConnectionGenericFile(const ConnectionGenericFile &) = delete;
const ConnectionGenericFile &
operator=(const ConnectionGenericFile &) = delete;
};
}

View File

@ -16,7 +16,8 @@
namespace lldb_private {
class HostThreadWindows : public HostNativeThreadBase {
DISALLOW_COPY_AND_ASSIGN(HostThreadWindows);
HostThreadWindows(const HostThreadWindows &) = delete;
const HostThreadWindows &operator=(const HostThreadWindows &) = delete;
public:
HostThreadWindows();

View File

@ -46,7 +46,8 @@ public:
static const char g_repeat_char = '!';
private:
DISALLOW_COPY_AND_ASSIGN(CommandHistory);
CommandHistory(const CommandHistory &) = delete;
const CommandHistory &operator=(const CommandHistory &) = delete;
typedef std::vector<std::string> History;
mutable std::recursive_mutex m_mutex;

View File

@ -51,7 +51,9 @@ protected:
bool m_is_removable;
private:
DISALLOW_COPY_AND_ASSIGN(CommandObjectRegexCommand);
CommandObjectRegexCommand(const CommandObjectRegexCommand &) = delete;
const CommandObjectRegexCommand &
operator=(const CommandObjectRegexCommand &) = delete;
};
} // namespace lldb_private

View File

@ -41,7 +41,8 @@ public:
OptionValueString summary_string; // a summary string
private:
DISALLOW_COPY_AND_ASSIGN(OptionGroupVariable);
OptionGroupVariable(const OptionGroupVariable &) = delete;
const OptionGroupVariable &operator=(const OptionGroupVariable &) = delete;
};
} // namespace lldb_private

View File

@ -46,7 +46,9 @@ public:
bool watch_type_specified;
private:
DISALLOW_COPY_AND_ASSIGN(OptionGroupWatchpoint);
OptionGroupWatchpoint(const OptionGroupWatchpoint &) = delete;
const OptionGroupWatchpoint &
operator=(const OptionGroupWatchpoint &) = delete;
};
} // namespace lldb_private

View File

@ -29,7 +29,9 @@ public:
virtual ~ScriptInterpreterLocker() = default;
private:
DISALLOW_COPY_AND_ASSIGN(ScriptInterpreterLocker);
ScriptInterpreterLocker(const ScriptInterpreterLocker &) = delete;
const ScriptInterpreterLocker &
operator=(const ScriptInterpreterLocker &) = delete;
};
class ScriptInterpreter : public PluginInterface {

View File

@ -376,7 +376,8 @@ protected:
Block *GetSiblingForChild(const Block *child_block) const;
private:
DISALLOW_COPY_AND_ASSIGN(Block);
Block(const Block &) = delete;
const Block &operator=(const Block &) = delete;
};
} // namespace lldb_private

View File

@ -447,7 +447,8 @@ private:
(1u << 6) ///< Have we parsed the debug macros already?
};
DISALLOW_COPY_AND_ASSIGN(CompileUnit);
CompileUnit(const CompileUnit &) = delete;
const CompileUnit &operator=(const CompileUnit &) = delete;
};
} // namespace lldb_private

View File

@ -89,7 +89,8 @@ public:
}
private:
DISALLOW_COPY_AND_ASSIGN(DebugMacros);
DebugMacros(const DebugMacros &) = delete;
const DebugMacros &operator=(const DebugMacros &) = delete;
std::vector<DebugMacroEntry> m_macro_entries;
};

View File

@ -67,7 +67,8 @@ public:
private:
// For DeclVendor only
DISALLOW_COPY_AND_ASSIGN(DeclVendor);
DeclVendor(const DeclVendor &) = delete;
const DeclVendor &operator=(const DeclVendor &) = delete;
const DeclVendorKind m_kind;
};

View File

@ -149,7 +149,8 @@ private:
Address m_first_non_prologue_insn;
DISALLOW_COPY_AND_ASSIGN(FuncUnwinders);
FuncUnwinders(const FuncUnwinders &) = delete;
const FuncUnwinders &operator=(const FuncUnwinders &) = delete;
}; // class FuncUnwinders

View File

@ -640,7 +640,8 @@ protected:
/// parsed.
std::vector<std::unique_ptr<CallEdge>> m_call_edges; ///< Outgoing call edges.
private:
DISALLOW_COPY_AND_ASSIGN(Function);
Function(const Function &) = delete;
const Function &operator=(const Function &) = delete;
};
} // namespace lldb_private

View File

@ -29,7 +29,8 @@ public:
virtual void Clear() = 0;
private:
DISALLOW_COPY_AND_ASSIGN(LineSequence);
LineSequence(const LineSequence &) = delete;
const LineSequence &operator=(const LineSequence &) = delete;
};
/// \class LineTable LineTable.h "lldb/Symbol/LineTable.h"
@ -337,7 +338,8 @@ protected:
bool ConvertEntryAtIndexToLineEntry(uint32_t idx, LineEntry &line_entry);
private:
DISALLOW_COPY_AND_ASSIGN(LineTable);
LineTable(const LineTable &) = delete;
const LineTable &operator=(const LineTable &) = delete;
};
} // namespace lldb_private

View File

@ -167,7 +167,8 @@ protected:
m_data; ///< The data for this object file so things can be parsed lazily.
private:
DISALLOW_COPY_AND_ASSIGN(ObjectContainer);
ObjectContainer(const ObjectContainer &) = delete;
const ObjectContainer &operator=(const ObjectContainer &) = delete;
};
} // namespace lldb_private

View File

@ -686,7 +686,8 @@ protected:
uint64_t Offset);
private:
DISALLOW_COPY_AND_ASSIGN(ObjectFile);
ObjectFile(const ObjectFile &) = delete;
const ObjectFile &operator=(const ObjectFile &) = delete;
};
} // namespace lldb_private

View File

@ -317,7 +317,8 @@ protected:
bool m_calculated_abilities;
private:
DISALLOW_COPY_AND_ASSIGN(SymbolFile);
SymbolFile(const SymbolFile &) = delete;
const SymbolFile &operator=(const SymbolFile &) = delete;
};
} // namespace lldb_private

View File

@ -52,7 +52,8 @@ protected:
private:
// For SymbolVendor only
DISALLOW_COPY_AND_ASSIGN(SymbolVendor);
SymbolVendor(const SymbolVendor &) = delete;
const SymbolVendor &operator=(const SymbolVendor &) = delete;
};
} // namespace lldb_private

View File

@ -224,7 +224,8 @@ private:
const char *decl_context,
const std::set<const char *> &class_contexts);
DISALLOW_COPY_AND_ASSIGN(Symtab);
Symtab(const Symtab &) = delete;
const Symtab &operator=(const Symtab &) = delete;
};
} // namespace lldb_private

View File

@ -63,7 +63,8 @@ private:
collection m_types;
DISALLOW_COPY_AND_ASSIGN(TypeList);
TypeList(const TypeList &) = delete;
const TypeList &operator=(const TypeList &) = delete;
};
} // namespace lldb_private

View File

@ -67,7 +67,8 @@ private:
collection m_types;
DISALLOW_COPY_AND_ASSIGN(TypeMap);
TypeMap(const TypeMap &) = delete;
const TypeMap &operator=(const TypeMap &) = delete;
};
} // namespace lldb_private

View File

@ -79,7 +79,8 @@ private:
std::unique_ptr<CompactUnwindInfo> m_compact_unwind_up;
std::unique_ptr<ArmUnwindInfo> m_arm_unwind_up;
DISALLOW_COPY_AND_ASSIGN(UnwindTable);
UnwindTable(const UnwindTable &) = delete;
const UnwindTable &operator=(const UnwindTable &) = delete;
};
} // namespace lldb_private

View File

@ -80,7 +80,8 @@ protected:
private:
// For VariableList only
DISALLOW_COPY_AND_ASSIGN(VariableList);
VariableList(const VariableList &) = delete;
const VariableList &operator=(const VariableList &) = delete;
};
} // namespace lldb_private

View File

@ -148,7 +148,8 @@ protected:
std::unique_ptr<llvm::MCRegisterInfo> m_mc_register_info_up;
private:
DISALLOW_COPY_AND_ASSIGN(ABI);
ABI(const ABI &) = delete;
const ABI &operator=(const ABI &) = delete;
};
class RegInfoBasedABI : public ABI {

View File

@ -310,7 +310,8 @@ protected:
*m_process; ///< The process that this dynamic loader plug-in is tracking.
private:
DISALLOW_COPY_AND_ASSIGN(DynamicLoader);
DynamicLoader(const DynamicLoader &) = delete;
const DynamicLoader &operator=(const DynamicLoader &) = delete;
};
} // namespace lldb_private

View File

@ -270,7 +270,8 @@ protected:
Language();
private:
DISALLOW_COPY_AND_ASSIGN(Language);
Language(const Language &) = delete;
const Language &operator=(const Language &) = delete;
};
} // namespace lldb_private

View File

@ -185,7 +185,8 @@ protected:
Process *m_process;
private:
DISALLOW_COPY_AND_ASSIGN(LanguageRuntime);
LanguageRuntime(const LanguageRuntime &) = delete;
const LanguageRuntime &operator=(const LanguageRuntime &) = delete;
};
} // namespace lldb_private

View File

@ -59,7 +59,8 @@ protected:
uint32_t m_L2_cache_line_byte_size;
private:
DISALLOW_COPY_AND_ASSIGN(MemoryCache);
MemoryCache(const MemoryCache &) = delete;
const MemoryCache &operator=(const MemoryCache &) = delete;
};
@ -135,7 +136,8 @@ protected:
PermissionsToBlockMap m_memory_map;
private:
DISALLOW_COPY_AND_ASSIGN(AllocatedMemoryCache);
AllocatedMemoryCache(const AllocatedMemoryCache &) = delete;
const AllocatedMemoryCache &operator=(const AllocatedMemoryCache &) = delete;
};
} // namespace lldb_private

View File

@ -69,7 +69,8 @@ protected:
Process
*m_process; ///< The process that this dynamic loader plug-in is tracking.
private:
DISALLOW_COPY_AND_ASSIGN(OperatingSystem);
OperatingSystem(const OperatingSystem &) = delete;
const OperatingSystem &operator=(const OperatingSystem &) = delete;
};
} // namespace lldb_private

View File

@ -928,7 +928,8 @@ private:
FileSpec GetModuleCacheRoot();
DISALLOW_COPY_AND_ASSIGN(Platform);
Platform(const Platform &) = delete;
const Platform &operator=(const Platform &) = delete;
};
class PlatformList {
@ -995,7 +996,8 @@ protected:
lldb::PlatformSP m_selected_platform_sp;
private:
DISALLOW_COPY_AND_ASSIGN(PlatformList);
PlatformList(const PlatformList &) = delete;
const PlatformList &operator=(const PlatformList &) = delete;
};
class OptionGroupPlatformRSync : public lldb_private::OptionGroup {
@ -1020,7 +1022,9 @@ public:
bool m_ignores_remote_hostname;
private:
DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformRSync);
OptionGroupPlatformRSync(const OptionGroupPlatformRSync &) = delete;
const OptionGroupPlatformRSync &
operator=(const OptionGroupPlatformRSync &) = delete;
};
class OptionGroupPlatformSSH : public lldb_private::OptionGroup {
@ -1043,7 +1047,9 @@ public:
std::string m_ssh_opts;
private:
DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformSSH);
OptionGroupPlatformSSH(const OptionGroupPlatformSSH &) = delete;
const OptionGroupPlatformSSH &
operator=(const OptionGroupPlatformSSH &) = delete;
};
class OptionGroupPlatformCaching : public lldb_private::OptionGroup {
@ -1065,7 +1071,9 @@ public:
std::string m_cache_dir;
private:
DISALLOW_COPY_AND_ASSIGN(OptionGroupPlatformCaching);
OptionGroupPlatformCaching(const OptionGroupPlatformCaching &) = delete;
const OptionGroupPlatformCaching &
operator=(const OptionGroupPlatformCaching &) = delete;
};
} // namespace lldb_private

View File

@ -497,7 +497,8 @@ public:
int m_update_state;
bool m_interrupted;
DISALLOW_COPY_AND_ASSIGN(ProcessEventData);
ProcessEventData(const ProcessEventData &) = delete;
const ProcessEventData &operator=(const ProcessEventData &) = delete;
};
/// Construct with a shared pointer to a target, and the Process listener.
@ -2933,7 +2934,8 @@ private:
void ControlPrivateStateThread(uint32_t signal);
DISALLOW_COPY_AND_ASSIGN(Process);
Process(const Process &) = delete;
const Process &operator=(const Process &) = delete;
};
/// RAII guard that should be acquired when an utility function is called within

View File

@ -144,7 +144,8 @@ private:
// dispatch_queue_t for this Queue
lldb::QueueKind m_kind;
DISALLOW_COPY_AND_ASSIGN(Queue);
Queue(const Queue &) = delete;
const Queue &operator=(const Queue &) = delete;
};
} // namespace lldb_private

View File

@ -159,7 +159,8 @@ protected:
std::string m_target_queue_label;
private:
DISALLOW_COPY_AND_ASSIGN(QueueItem);
QueueItem(const QueueItem &) = delete;
const QueueItem &operator=(const QueueItem &) = delete;
};
} // namespace lldb_private

View File

@ -45,7 +45,8 @@ protected:
Reason m_reason;
// Make RegisterCheckpointSP if you wish to share the data in this class.
DISALLOW_COPY_AND_ASSIGN(RegisterCheckpoint);
RegisterCheckpoint(const RegisterCheckpoint &) = delete;
const RegisterCheckpoint &operator=(const RegisterCheckpoint &) = delete;
};
} // namespace lldb_private

View File

@ -201,7 +201,8 @@ protected:
uint32_t m_stop_id; // The stop ID that any data in this context is valid for
private:
// For RegisterContext only
DISALLOW_COPY_AND_ASSIGN(RegisterContext);
RegisterContext(const RegisterContext &) = delete;
const RegisterContext &operator=(const RegisterContext &) = delete;
};
} // namespace lldb_private

View File

@ -249,7 +249,9 @@ private:
lldb_private::UnwindLLDB &m_parent_unwind; // The UnwindLLDB that is creating
// this RegisterContextUnwind
DISALLOW_COPY_AND_ASSIGN(RegisterContextUnwind);
RegisterContextUnwind(const RegisterContextUnwind &) = delete;
const RegisterContextUnwind &
operator=(const RegisterContextUnwind &) = delete;
};
} // namespace lldb_private

View File

@ -75,7 +75,8 @@ protected:
mutable std::recursive_mutex m_mutex;
private:
DISALLOW_COPY_AND_ASSIGN(SectionLoadHistory);
SectionLoadHistory(const SectionLoadHistory &) = delete;
const SectionLoadHistory &operator=(const SectionLoadHistory &) = delete;
};
} // namespace lldb_private

View File

@ -525,7 +525,8 @@ private:
StreamString m_disassembly;
std::recursive_mutex m_mutex;
DISALLOW_COPY_AND_ASSIGN(StackFrame);
StackFrame(const StackFrame &) = delete;
const StackFrame &operator=(const StackFrame &) = delete;
};
} // namespace lldb_private

View File

@ -155,7 +155,8 @@ protected:
const bool m_show_inlined_frames;
private:
DISALLOW_COPY_AND_ASSIGN(StackFrameList);
StackFrameList(const StackFrameList &) = delete;
const StackFrameList &operator=(const StackFrameList &) = delete;
};
} // namespace lldb_private

View File

@ -90,7 +90,9 @@ public:
lldb::StackFrameSP frame) override;
private:
DISALLOW_COPY_AND_ASSIGN(ScriptedStackFrameRecognizer);
ScriptedStackFrameRecognizer(const ScriptedStackFrameRecognizer &) = delete;
const ScriptedStackFrameRecognizer &
operator=(const ScriptedStackFrameRecognizer &) = delete;
};
/// \class StackFrameRecognizerManager

Some files were not shown because too many files have changed in this diff Show More