File tree Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Expand file tree Collapse file tree 5 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -706,7 +706,7 @@ struct TargetMetadata {
706
706
#endif
707
707
708
708
#ifndef NDEBUG
709
- LLVM_ATTRIBUTE_DEPRECATED (void dump () const LLVM_ATTRIBUTE_USED ,
709
+ LLVM_ATTRIBUTE_DEPRECATED (void dump () const ,
710
710
"Only meant for use in the debugger");
711
711
#endif
712
712
@@ -2404,7 +2404,7 @@ struct TargetProtocolConformanceDescriptor final
2404
2404
// /
2405
2405
// / 1. Has a valid TypeReferenceKind.
2406
2406
// / 2. Has a valid conformance kind.
2407
- void verify () const LLVM_ATTRIBUTE_USED ;
2407
+ void verify () const ;
2408
2408
#endif
2409
2409
2410
2410
private:
@@ -2997,7 +2997,7 @@ struct TargetProtocolDescriptor final
2997
2997
}
2998
2998
2999
2999
#ifndef NDEBUG
3000
- LLVM_ATTRIBUTE_DEPRECATED (void dump () const LLVM_ATTRIBUTE_USED ,
3000
+ LLVM_ATTRIBUTE_DEPRECATED (void dump () const ,
3001
3001
"only for use in the debugger");
3002
3002
#endif
3003
3003
Original file line number Diff line number Diff line change @@ -64,11 +64,11 @@ struct TargetOpaqueExistentialContainer {
64
64
// /
65
65
// / The intention is that this is used in combination with ASAN or Guard
66
66
// / Malloc to catch use-after-frees.
67
- void verify () const LLVM_ATTRIBUTE_USED ;
67
+ void verify () const ;
68
68
69
69
// / Dump information about this specific box and its contents. Only intended
70
70
// / for use in the debugger.
71
- LLVM_ATTRIBUTE_DEPRECATED (void dump () const LLVM_ATTRIBUTE_USED ,
71
+ LLVM_ATTRIBUTE_DEPRECATED (void dump () const ,
72
72
"Only meant for use in the debugger");
73
73
#endif
74
74
};
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ void OpaqueExistentialContainer::deinit() {
57
57
// *NOTE* This routine performs unused memory reads on purpose to try to catch
58
58
// use-after-frees in conjunction with ASAN or Guard Malloc.
59
59
template <>
60
+ LLVM_ATTRIBUTE_USED
60
61
void OpaqueExistentialContainer::verify () const {
61
62
// We do not actually care about value. We just want to see if the
62
63
// memory is valid or not. So convert to a uint8_t and try to
@@ -70,6 +71,7 @@ void OpaqueExistentialContainer::verify() const {
70
71
71
72
// / Dump information about this specific container and its contents.
72
73
template <>
74
+ LLVM_ATTRIBUTE_USED
73
75
void OpaqueExistentialContainer::dump () const {
74
76
// Quickly verify to make sure we are well formed.
75
77
verify ();
Original file line number Diff line number Diff line change @@ -3913,7 +3913,9 @@ StringRef swift::getStringForMetadataKind(MetadataKind kind) {
3913
3913
}
3914
3914
3915
3915
#ifndef NDEBUG
3916
- template <> void Metadata::dump () const {
3916
+ template <>
3917
+ LLVM_ATTRIBUTE_USED
3918
+ void Metadata::dump () const {
3917
3919
printf (" TargetMetadata.\n " );
3918
3920
printf (" Kind: %s.\n " , getStringForMetadataKind (getKind ()).data ());
3919
3921
printf (" Value Witnesses: %p.\n " , getValueWitnesses ());
Original file line number Diff line number Diff line change 31
31
using namespace swift ;
32
32
33
33
#ifndef NDEBUG
34
- template <> void ProtocolDescriptor::dump () const {
34
+ template <>
35
+ LLVM_ATTRIBUTE_USED
36
+ void ProtocolDescriptor::dump () const {
35
37
printf (" TargetProtocolDescriptor.\n "
36
38
" Name: \" %s\" .\n " ,
37
39
Name.get ());
@@ -93,7 +95,9 @@ template<> void ProtocolConformanceDescriptor::dump() const {
93
95
#endif
94
96
95
97
#ifndef NDEBUG
96
- template <> void ProtocolConformanceDescriptor::verify () const {
98
+ template <>
99
+ LLVM_ATTRIBUTE_USED
100
+ void ProtocolConformanceDescriptor::verify () const {
97
101
auto typeKind = unsigned (getTypeKind ());
98
102
assert (((unsigned (TypeReferenceKind::First_Kind) <= typeKind) &&
99
103
(unsigned (TypeReferenceKind::Last_Kind) >= typeKind)) &&
You can’t perform that action at this time.
0 commit comments