mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -33,9 +33,8 @@ class ImmutableListImpl : public FoldingSetNode {
|
|||||||
|
|
||||||
friend class ImmutableListFactory<T>;
|
friend class ImmutableListFactory<T>;
|
||||||
|
|
||||||
// Do not implement.
|
void operator=(const ImmutableListImpl&) LLVM_DELETED_FUNCTION;
|
||||||
void operator=(const ImmutableListImpl&);
|
ImmutableListImpl(const ImmutableListImpl&) LLVM_DELETED_FUNCTION;
|
||||||
ImmutableListImpl(const ImmutableListImpl&);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const T& getHead() const { return Head; }
|
const T& getHead() const { return Head; }
|
||||||
|
@ -122,8 +122,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Factory(const Factory& RHS); // DO NOT IMPLEMENT
|
Factory(const Factory& RHS) LLVM_DELETED_FUNCTION;
|
||||||
void operator=(const Factory& RHS); // DO NOT IMPLEMENT
|
void operator=(const Factory& RHS) LLVM_DELETED_FUNCTION;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool contains(key_type_ref K) const {
|
bool contains(key_type_ref K) const {
|
||||||
|
@ -1007,8 +1007,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Factory(const Factory& RHS); // DO NOT IMPLEMENT
|
Factory(const Factory& RHS) LLVM_DELETED_FUNCTION;
|
||||||
void operator=(const Factory& RHS); // DO NOT IMPLEMENT
|
void operator=(const Factory& RHS) LLVM_DELETED_FUNCTION;
|
||||||
};
|
};
|
||||||
|
|
||||||
friend class Factory;
|
friend class Factory;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#ifndef LLVM_ADT_OWNING_PTR_H
|
#ifndef LLVM_ADT_OWNING_PTR_H
|
||||||
#define LLVM_ADT_OWNING_PTR_H
|
#define LLVM_ADT_OWNING_PTR_H
|
||||||
|
|
||||||
|
#include "llvm/Support/Compiler.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
@ -25,8 +26,8 @@ namespace llvm {
|
|||||||
/// pointee object can be taken away from OwningPtr by using the take method.
|
/// pointee object can be taken away from OwningPtr by using the take method.
|
||||||
template<class T>
|
template<class T>
|
||||||
class OwningPtr {
|
class OwningPtr {
|
||||||
OwningPtr(OwningPtr const &); // DO NOT IMPLEMENT
|
OwningPtr(OwningPtr const &) LLVM_DELETED_FUNCTION;
|
||||||
OwningPtr &operator=(OwningPtr const &); // DO NOT IMPLEMENT
|
OwningPtr &operator=(OwningPtr const &) LLVM_DELETED_FUNCTION;
|
||||||
T *Ptr;
|
T *Ptr;
|
||||||
public:
|
public:
|
||||||
explicit OwningPtr(T *P = 0) : Ptr(P) {}
|
explicit OwningPtr(T *P = 0) : Ptr(P) {}
|
||||||
@ -79,8 +80,8 @@ inline void swap(OwningPtr<T> &a, OwningPtr<T> &b) {
|
|||||||
/// functionality as OwningPtr, except that it works for array types.
|
/// functionality as OwningPtr, except that it works for array types.
|
||||||
template<class T>
|
template<class T>
|
||||||
class OwningArrayPtr {
|
class OwningArrayPtr {
|
||||||
OwningArrayPtr(OwningArrayPtr const &); // DO NOT IMPLEMENT
|
OwningArrayPtr(OwningArrayPtr const &) LLVM_DELETED_FUNCTION;
|
||||||
OwningArrayPtr &operator=(OwningArrayPtr const &); // DO NOT IMPLEMENT
|
OwningArrayPtr &operator=(OwningArrayPtr const &) LLVM_DELETED_FUNCTION;
|
||||||
T *Ptr;
|
T *Ptr;
|
||||||
public:
|
public:
|
||||||
explicit OwningArrayPtr(T *P = 0) : Ptr(P) {}
|
explicit OwningArrayPtr(T *P = 0) : Ptr(P) {}
|
||||||
|
@ -90,8 +90,8 @@ class ScopedHashTableScope {
|
|||||||
/// LastValInScope - This is the last value that was inserted for this scope
|
/// LastValInScope - This is the last value that was inserted for this scope
|
||||||
/// or null if none have been inserted yet.
|
/// or null if none have been inserted yet.
|
||||||
ScopedHashTableVal<K, V> *LastValInScope;
|
ScopedHashTableVal<K, V> *LastValInScope;
|
||||||
void operator=(ScopedHashTableScope&); // DO NOT IMPLEMENT
|
void operator=(ScopedHashTableScope&) LLVM_DELETED_FUNCTION;
|
||||||
ScopedHashTableScope(ScopedHashTableScope&); // DO NOT IMPLEMENT
|
ScopedHashTableScope(ScopedHashTableScope&) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
ScopedHashTableScope(ScopedHashTable<K, V, KInfo, AllocatorTy> &HT);
|
ScopedHashTableScope(ScopedHashTable<K, V, KInfo, AllocatorTy> &HT);
|
||||||
~ScopedHashTableScope();
|
~ScopedHashTableScope();
|
||||||
|
@ -128,8 +128,8 @@ class SparseSet {
|
|||||||
|
|
||||||
// Disable copy construction and assignment.
|
// Disable copy construction and assignment.
|
||||||
// This data structure is not meant to be used that way.
|
// This data structure is not meant to be used that way.
|
||||||
SparseSet(const SparseSet&); // DO NOT IMPLEMENT.
|
SparseSet(const SparseSet&) LLVM_DELETED_FUNCTION;
|
||||||
SparseSet &operator=(const SparseSet&); // DO NOT IMPLEMENT.
|
SparseSet &operator=(const SparseSet&) LLVM_DELETED_FUNCTION;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef ValueT value_type;
|
typedef ValueT value_type;
|
||||||
|
@ -80,8 +80,8 @@ class ValueMap {
|
|||||||
typedef typename Config::ExtraData ExtraData;
|
typedef typename Config::ExtraData ExtraData;
|
||||||
MapT Map;
|
MapT Map;
|
||||||
ExtraData Data;
|
ExtraData Data;
|
||||||
ValueMap(const ValueMap&); // DO NOT IMPLEMENT
|
ValueMap(const ValueMap&) LLVM_DELETED_FUNCTION;
|
||||||
ValueMap& operator=(const ValueMap&); // DO NOT IMPLEMENT
|
ValueMap& operator=(const ValueMap&) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
typedef KeyT key_type;
|
typedef KeyT key_type;
|
||||||
typedef ValueT mapped_type;
|
typedef ValueT mapped_type;
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
#ifndef LLVM_ADT_ILIST_H
|
#ifndef LLVM_ADT_ILIST_H
|
||||||
#define LLVM_ADT_ILIST_H
|
#define LLVM_ADT_ILIST_H
|
||||||
|
|
||||||
|
#include "llvm/Support/Compiler.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
@ -331,8 +332,8 @@ class iplist : public Traits {
|
|||||||
|
|
||||||
// No fundamental reason why iplist can't be copyable, but the default
|
// No fundamental reason why iplist can't be copyable, but the default
|
||||||
// copy/copy-assign won't do.
|
// copy/copy-assign won't do.
|
||||||
iplist(const iplist &); // do not implement
|
iplist(const iplist &) LLVM_DELETED_FUNCTION;
|
||||||
void operator=(const iplist &); // do not implement
|
void operator=(const iplist &) LLVM_DELETED_FUNCTION;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef NodeTy *pointer;
|
typedef NodeTy *pointer;
|
||||||
|
@ -78,9 +78,10 @@ public:
|
|||||||
~FileOutputBuffer();
|
~FileOutputBuffer();
|
||||||
|
|
||||||
|
|
||||||
|
private:
|
||||||
|
FileOutputBuffer(const FileOutputBuffer &) LLVM_DELETED_FUNCTION;
|
||||||
|
FileOutputBuffer &operator=(const FileOutputBuffer &) LLVM_DELETED_FUNCTION;
|
||||||
protected:
|
protected:
|
||||||
FileOutputBuffer(const FileOutputBuffer &); // DO NOT IMPLEMENT
|
|
||||||
FileOutputBuffer &operator=(const FileOutputBuffer &); // DO NOT IMPLEMENT
|
|
||||||
FileOutputBuffer(uint8_t *Start, uint8_t *End,
|
FileOutputBuffer(uint8_t *Start, uint8_t *End,
|
||||||
StringRef Path, StringRef TempPath);
|
StringRef Path, StringRef TempPath);
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ namespace llvm {
|
|||||||
/// @brief Guard a section of code with a Mutex.
|
/// @brief Guard a section of code with a Mutex.
|
||||||
class MutexGuard {
|
class MutexGuard {
|
||||||
sys::Mutex &M;
|
sys::Mutex &M;
|
||||||
MutexGuard(const MutexGuard &); // DO NOT IMPLEMENT
|
MutexGuard(const MutexGuard &) LLVM_DELETED_FUNCTION;
|
||||||
void operator=(const MutexGuard &); // DO NOT IMPLEMENT
|
void operator=(const MutexGuard &) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
MutexGuard(sys::Mutex &m) : M(m) { M.acquire(); }
|
MutexGuard(sys::Mutex &m) : M(m) { M.acquire(); }
|
||||||
~MutexGuard() { M.release(); }
|
~MutexGuard() { M.release(); }
|
||||||
|
@ -37,7 +37,7 @@ namespace llvm {
|
|||||||
/// is necessary to define an alternate traits class.
|
/// is necessary to define an alternate traits class.
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class RegistryTraits {
|
class RegistryTraits {
|
||||||
RegistryTraits(); // Do not implement.
|
RegistryTraits() LLVM_DELETED_FUNCTION;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef SimpleRegistryEntry<T> entry;
|
typedef SimpleRegistryEntry<T> entry;
|
||||||
@ -63,7 +63,7 @@ namespace llvm {
|
|||||||
class iterator;
|
class iterator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Registry(); // Do not implement.
|
Registry() LLVM_DELETED_FUNCTION;
|
||||||
|
|
||||||
static void Announce(const entry &E) {
|
static void Announce(const entry &E) {
|
||||||
for (listener *Cur = ListenerHead; Cur; Cur = Cur->Next)
|
for (listener *Cur = ListenerHead; Cur; Cur = Cur->Next)
|
||||||
|
@ -60,7 +60,7 @@ private:
|
|||||||
// access.
|
// access.
|
||||||
PointerIntPair<Value*, 2> VP;
|
PointerIntPair<Value*, 2> VP;
|
||||||
|
|
||||||
explicit ValueHandleBase(const ValueHandleBase&); // DO NOT IMPLEMENT.
|
ValueHandleBase(const ValueHandleBase&) LLVM_DELETED_FUNCTION;
|
||||||
public:
|
public:
|
||||||
explicit ValueHandleBase(HandleBaseKind Kind)
|
explicit ValueHandleBase(HandleBaseKind Kind)
|
||||||
: PrevPair(0, Kind), Next(0), VP(0, 0) {}
|
: PrevPair(0, Kind), Next(0), VP(0, 0) {}
|
||||||
|
Reference in New Issue
Block a user