Skip to content

Commit 8f062ad

Browse files
authored
Merge pull request #40017 from gottesmm/pr-a66d3d5fb98774eb8736a7507948a18b05510673
[sil] Add SILValue::dump() for use in the debugger.
2 parents d584153 + a670a34 commit 8f062ad

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/swift/SIL/SILValue.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "llvm/ADT/Hashing.h"
2929
#include "llvm/ADT/Optional.h"
3030
#include "llvm/ADT/PointerUnion.h"
31+
#include "llvm/Support/Compiler.h"
3132
#include "llvm/Support/raw_ostream.h"
3233

3334
namespace swift {
@@ -642,6 +643,9 @@ class SILValue {
642643

643644
/// Verify that this SILValue and its uses respects ownership invariants.
644645
void verifyOwnership(DeadEndBlocks *DEBlocks) const;
646+
647+
LLVM_ATTRIBUTE_DEPRECATED(void dump() const LLVM_ATTRIBUTE_USED,
648+
"Only for use in the debugger");
645649
};
646650

647651
inline SILNodePointer::SILNodePointer(SILValue value) : node(value) { }

lib/SIL/IR/SILValue.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ SILLocation SILValue::getLoc() const {
134134
return Value->getFunction()->getLocation();
135135
}
136136

137+
void SILValue::dump() const {
138+
Value->dump();
139+
}
140+
137141
//===----------------------------------------------------------------------===//
138142
// OwnershipKind
139143
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)