mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[sil] Add SILValue::dump() for use in the debugger.
It just trampolines to calling ValueBase::dump(). The reason I added this is sometimes one wants to do this in the debugger and confuses if one has a ValueBase or a SILValue causing lldb to be unhappy. By mirroring this API, one can do the same operation on either type and just move on with ones life. I also wrapped this in LLVM_ATTRIBUTE_DEPRECATED with a msg saying only for use in the debugger so people do not call dump() in the codebase by mistake.
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/Optional.h"
|
||||
#include "llvm/ADT/PointerUnion.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
namespace swift {
|
||||
@@ -642,6 +643,9 @@ 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");
|
||||
};
|
||||
|
||||
inline SILNodePointer::SILNodePointer(SILValue value) : node(value) { }
|
||||
|
||||
Reference in New Issue
Block a user