Skip to content

remove VS2015 workaround (NFC) #28936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ class alignas(1 << DeclAlignInBits) Decl {

// Make vanilla new/delete illegal for Decls.
void *operator new(size_t Bytes) = delete;
void operator delete(void *Data) SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *Data) = delete;

// Only allow allocation of Decls using the allocator in ASTContext
// or by doing a placement new.
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/GenericEnvironment.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class alignas(1 << DeclAlignInBits) GenericEnvironment final

/// Make vanilla new/delete illegal.
void *operator new(size_t Bytes) = delete;
void operator delete(void *Data) SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *Data) = delete;

/// Only allow placement new.
void *operator new(size_t Bytes, void *Mem) {
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ class ModuleDecl : public DeclContext, public TypeDecl {
private:
// Make placement new and vanilla new/delete illegal for Modules.
void *operator new(size_t Bytes) throw() = delete;
void operator delete(void *Data) throw() SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *Data) throw() = delete;
void *operator new(size_t Bytes, void *Mem) throw() = delete;
public:
// Only allow allocation of Modules using the allocator in ASTContext
Expand Down
2 changes: 1 addition & 1 deletion include/swift/AST/ProtocolConformance.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class alignas(1 << DeclAlignInBits) ProtocolConformance {

// Make vanilla new/delete illegal for protocol conformances.
void *operator new(size_t bytes) = delete;
void operator delete(void *data) SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *data) = delete;

// Only allow allocation of protocol conformances using the allocator in
// ASTContext or by doing a placement new.
Expand Down
9 changes: 0 additions & 9 deletions include/swift/Basic/Compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@
#define __has_attribute(x) 0
#endif

#if SWIFT_COMPILER_IS_MSVC && _MSC_VER < 1910
// Work around MSVC bug: attempting to reference a deleted function
// https://connect.microsoft.com/VisualStudio/feedback/details/3116505
#define SWIFT_DELETE_OPERATOR_DELETED \
{ llvm_unreachable("Delete operator should not be called."); }
#else
#define SWIFT_DELETE_OPERATOR_DELETED = delete;
#endif

// __builtin_assume() is an optimization hint.
#if __has_builtin(__builtin_assume)
#define SWIFT_ASSUME(x) __builtin_assume(x)
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/SILAllocated.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class SILAllocated {
void *operator new[](size_t) = delete;

/// Disable non-placement delete.
void operator delete(void *) SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *) = delete;
void operator delete[](void *) = delete;

/// Custom version of 'new' that uses the SILModule's BumpPtrAllocator with
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/SILArgument.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class SILArgument : public ValueBase {

public:
void operator=(const SILArgument &) = delete;
void operator delete(void *, size_t) SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *, size_t) = delete;

ValueOwnershipKind getOwnershipKind() const {
return static_cast<ValueOwnershipKind>(Bits.SILArgument.VOKind);
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/SILBasicBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public llvm::ilist_node<SILBasicBlock>, public SILAllocated<SILBasicBlock> {
SILBasicBlock() : Parent(nullptr) {}
void operator=(const SILBasicBlock &) = delete;

void operator delete(void *Ptr, size_t) SWIFT_DELETE_OPERATOR_DELETED
void operator delete(void *Ptr, size_t) = delete;

SILBasicBlock(SILFunction *F, SILBasicBlock *relativeToBB, bool after);

Expand Down
6 changes: 3 additions & 3 deletions include/swift/SIL/SILInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ class SILInstruction

SILInstruction() = delete;
void operator=(const SILInstruction &) = delete;
void operator delete(void *Ptr, size_t) SWIFT_DELETE_OPERATOR_DELETED
void operator delete(void *Ptr, size_t) = delete;

/// Check any special state of instructions that are not represented in the
/// instructions operands/type.
Expand Down Expand Up @@ -799,7 +799,7 @@ class SingleValueInstruction : public SILInstruction, public ValueBase {
SILModule &getModule() const { return SILInstruction::getModule(); }
SILInstructionKind getKind() const { return SILInstruction::getKind(); }

void operator delete(void *Ptr, size_t) SWIFT_DELETE_OPERATOR_DELETED
void operator delete(void *Ptr, size_t) = delete;

ValueKind getValueKind() const {
return ValueBase::getKind();
Expand Down Expand Up @@ -950,7 +950,7 @@ class MultipleValueInstruction : public SILInstruction {
: SILInstruction(kind, loc) {}

public:
void operator delete(void *Ptr, size_t)SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *Ptr, size_t) = delete;

MultipleValueInstruction *clone(SILInstruction *insertPt = nullptr) {
return cast<MultipleValueInstruction>(SILInstruction::clone(insertPt));
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/SILUndef.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SILUndef : public ValueBase {

public:
void operator=(const SILArgument &) = delete;
void operator delete(void *, size_t) SWIFT_DELETE_OPERATOR_DELETED;
void operator delete(void *, size_t) = delete;

static SILUndef *get(SILType ty, SILModule &m, ValueOwnershipKind ownershipKind);
static SILUndef *get(SILType ty, const SILFunction &f);
Expand Down