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

View File

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

View File

@@ -778,8 +778,7 @@ public:
llvm::raw_ostream &printPretty(llvm::raw_ostream &os) const;
/// Dump this name to standard error.
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED,
"only for use within the debugger");
SWIFT_DEBUG_DUMP;
};
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
/// used so it won't be eliminated as dead code.
#define SWIFT_DEBUG_HELPER(method) \
LLVM_ATTRIBUTE_DEPRECATED(method LLVM_ATTRIBUTE_USED, \
"only for use in the debugger")
[[deprecated("only for use in the debugger")]] method LLVM_ATTRIBUTE_USED
/// Declares a const void instance method with the name and parameters provided.
/// 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
/// for use in the debugger.
LLVM_ATTRIBUTE_DEPRECATED(void dump() const,
"Only meant for use in the debugger");
[[deprecated("Only meant for use in the debugger")]] void dump() const;
#endif
};
using OpaqueExistentialContainer = TargetOpaqueExistentialContainer<InProcess>;

View File

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

View File

@@ -17,6 +17,7 @@
#ifndef SWIFT_SIL_SILVALUE_H
#define SWIFT_SIL_SILVALUE_H
#include "swift/Basic/Debug.h"
#include "swift/Basic/Range.h"
#include "swift/Basic/ArrayRefView.h"
#include "swift/Basic/STLExtras.h"
@@ -659,8 +660,7 @@ public:
/// Verify that this SILValue and its uses respects ownership invariants.
void verifyOwnership(DeadEndBlocks *DEBlocks) const;
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED,
"Only for use in the debugger");
SWIFT_DEBUG_DUMP;
};
inline SILNodePointer::SILNodePointer(SILValue value) : node(value) { }
@@ -1090,10 +1090,8 @@ public:
SILBasicBlock *getParentBlock() 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;
SWIFT_DEBUG_DUMP;
private:
void removeFromCurrent() {

View File

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