[next] Remove LLVM_ATTRIBUTE_DEPRECATED

`LLVM_ATTRIBUTE_DEPRECATED` was removed in llvm/llvm-project
903c30f4d1f3bc0d1aae9ca83af17c0062d02b40. Use `[[deprecated]]` directly.
This commit is contained in:
Ben Barham
2022-04-25 15:24:26 -07:00
parent 9aeaad739a
commit 68296c9037
8 changed files with 15 additions and 25 deletions

View File

@@ -424,8 +424,7 @@ public:
#endif #endif
#ifndef NDEBUG #ifndef NDEBUG
LLVM_ATTRIBUTE_DEPRECATED(void dump() const, [[deprecated("Only meant for use in the debugger")]] void dump() const;
"Only meant for use in the debugger");
#endif #endif
protected: protected:
@@ -2667,8 +2666,7 @@ struct TargetContextDescriptor {
} }
#ifndef NDEBUG #ifndef NDEBUG
LLVM_ATTRIBUTE_DEPRECATED(void dump() const, [[deprecated("Only meant for use in the debugger")]] void dump() const;
"only for use in the debugger");
#endif #endif
private: private:
@@ -2930,8 +2928,7 @@ public:
} }
#ifndef NDEBUG #ifndef NDEBUG
LLVM_ATTRIBUTE_DEPRECATED(void dump() const, [[deprecated("Only meant for use in the debugger")]] void dump() const;
"only for use in the debugger");
#endif #endif
static bool classof(const TargetContextDescriptor<Runtime> *cd) { static bool classof(const TargetContextDescriptor<Runtime> *cd) {
@@ -4399,8 +4396,7 @@ public:
} }
#ifndef NDEBUG #ifndef NDEBUG
LLVM_ATTRIBUTE_DEPRECATED(void dump() const, [[deprecated("Only meant for use in the debugger")]] void dump() const;
"Only meant for use in the debugger");
#endif #endif
}; };

View File

@@ -22,6 +22,7 @@
#include "swift/ABI/KeyPath.h" #include "swift/ABI/KeyPath.h"
#include "swift/ABI/ProtocolDispatchStrategy.h" #include "swift/ABI/ProtocolDispatchStrategy.h"
#include "swift/AST/Ownership.h" #include "swift/AST/Ownership.h"
#include "swift/Basic/Debug.h"
#include "swift/Basic/LLVM.h" #include "swift/Basic/LLVM.h"
#include "swift/Basic/FlagSet.h" #include "swift/Basic/FlagSet.h"
#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/ArrayRef.h"
@@ -531,8 +532,7 @@ public:
} }
#ifndef NDEBUG #ifndef NDEBUG
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED, SWIFT_DEBUG_DUMP;
"Only for use in the debugger");
#endif #endif
}; };

View File

@@ -778,8 +778,7 @@ public:
llvm::raw_ostream &printPretty(llvm::raw_ostream &os) const; llvm::raw_ostream &printPretty(llvm::raw_ostream &os) const;
/// Dump this name to standard error. /// Dump this name to standard error.
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED, SWIFT_DEBUG_DUMP;
"only for use within the debugger");
}; };
inline DeclNameRef DeclNameRef::getFromOpaqueValue(void *p) { inline DeclNameRef DeclNameRef::getFromOpaqueValue(void *p) {

View File

@@ -20,8 +20,7 @@
/// This deprecates the method so it won't be called directly and marks it as /// This deprecates the method so it won't be called directly and marks it as
/// used so it won't be eliminated as dead code. /// used so it won't be eliminated as dead code.
#define SWIFT_DEBUG_HELPER(method) \ #define SWIFT_DEBUG_HELPER(method) \
LLVM_ATTRIBUTE_DEPRECATED(method LLVM_ATTRIBUTE_USED, \ [[deprecated("only for use in the debugger")]] method LLVM_ATTRIBUTE_USED
"only for use in the debugger")
/// Declares a const void instance method with the name and parameters provided. /// Declares a const void instance method with the name and parameters provided.
/// Methods declared with this macro should never be called except in the /// Methods declared with this macro should never be called except in the

View File

@@ -68,8 +68,7 @@ struct TargetOpaqueExistentialContainer {
/// Dump information about this specific box and its contents. Only intended /// Dump information about this specific box and its contents. Only intended
/// for use in the debugger. /// for use in the debugger.
LLVM_ATTRIBUTE_DEPRECATED(void dump() const, [[deprecated("Only meant for use in the debugger")]] void dump() const;
"Only meant for use in the debugger");
#endif #endif
}; };
using OpaqueExistentialContainer = TargetOpaqueExistentialContainer<InProcess>; using OpaqueExistentialContainer = TargetOpaqueExistentialContainer<InProcess>;

View File

@@ -184,8 +184,7 @@ public:
} }
// FIXME -- Temporary until LLDB adopts getASTType() // FIXME -- Temporary until LLDB adopts getASTType()
LLVM_ATTRIBUTE_DEPRECATED(CanType getSwiftRValueType() const, [[deprecated("Please use getASTType()")]] CanType getSwiftRValueType() const {
"Please use getASTType()") {
return getASTType(); return getASTType();
} }

View File

@@ -17,6 +17,7 @@
#ifndef SWIFT_SIL_SILVALUE_H #ifndef SWIFT_SIL_SILVALUE_H
#define SWIFT_SIL_SILVALUE_H #define SWIFT_SIL_SILVALUE_H
#include "swift/Basic/Debug.h"
#include "swift/Basic/Range.h" #include "swift/Basic/Range.h"
#include "swift/Basic/ArrayRefView.h" #include "swift/Basic/ArrayRefView.h"
#include "swift/Basic/STLExtras.h" #include "swift/Basic/STLExtras.h"
@@ -659,8 +660,7 @@ public:
/// Verify that this SILValue and its uses respects ownership invariants. /// Verify that this SILValue and its uses respects ownership invariants.
void verifyOwnership(DeadEndBlocks *DEBlocks) const; void verifyOwnership(DeadEndBlocks *DEBlocks) const;
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED, SWIFT_DEBUG_DUMP;
"Only for use in the debugger");
}; };
inline SILNodePointer::SILNodePointer(SILValue value) : node(value) { } inline SILNodePointer::SILNodePointer(SILValue value) : node(value) { }
@@ -1090,10 +1090,8 @@ public:
SILBasicBlock *getParentBlock() const; SILBasicBlock *getParentBlock() const;
SILFunction *getParentFunction() const; SILFunction *getParentFunction() const;
LLVM_ATTRIBUTE_DEPRECATED(
void dump() const LLVM_ATTRIBUTE_USED,
"Dump the operand's state. Only for use in the debugger!");
void print(llvm::raw_ostream &os) const; void print(llvm::raw_ostream &os) const;
SWIFT_DEBUG_DUMP;
private: private:
void removeFromCurrent() { void removeFromCurrent() {

View File

@@ -17,6 +17,7 @@
#ifndef SWIFT_SILGEN_CLEANUP_H #ifndef SWIFT_SILGEN_CLEANUP_H
#define SWIFT_SILGEN_CLEANUP_H #define SWIFT_SILGEN_CLEANUP_H
#include "swift/Basic/Debug.h"
#include "swift/Basic/DiverseStack.h" #include "swift/Basic/DiverseStack.h"
#include "swift/SIL/SILLocation.h" #include "swift/SIL/SILLocation.h"
#include "swift/SIL/SILValue.h" #include "swift/SIL/SILValue.h"
@@ -280,8 +281,7 @@ public:
bool hasAnyActiveCleanups(CleanupsDepth from); bool hasAnyActiveCleanups(CleanupsDepth from);
/// Dump the output of each cleanup on this stack. /// Dump the output of each cleanup on this stack.
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED, SWIFT_DEBUG_DUMP;
"Only for use in the debugger");
/// Dump the given cleanup handle if it is on the current stack. /// Dump the given cleanup handle if it is on the current stack.
void dump(CleanupHandle handle) const; void dump(CleanupHandle handle) const;