mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add option -sil-print-debuginfo-verbose
The option -sil-print-debuginfo-verbose will print the values of the fields, implicit, and autoGenerated for a SILLocation, as well as whether the SILLocation is considered hidden from debug information by calling SILLocation::isHiddenFromDebugInfo()
This commit is contained in:
@@ -73,6 +73,11 @@ llvm::cl::opt<bool>
|
||||
SILPrintDebugInfo("sil-print-debuginfo", llvm::cl::init(false),
|
||||
llvm::cl::desc("Include debug info in SIL output"));
|
||||
|
||||
llvm::cl::opt<bool>
|
||||
SILPrintDebugInfoVerbose("sil-print-debuginfo-verbose",
|
||||
llvm::cl::init(false),
|
||||
llvm::cl::desc("Print verbose debug info output"));
|
||||
|
||||
llvm::cl::opt<bool>
|
||||
SILPrintSourceInfo("sil-print-sourceinfo", llvm::cl::init(false),
|
||||
llvm::cl::desc("Include source annotation in SIL output"));
|
||||
@@ -1132,6 +1137,22 @@ public:
|
||||
*this << "* ";
|
||||
*this << QuotedString(DL.filename) << ':' << DL.line << ':'
|
||||
<< (unsigned)DL.column;
|
||||
if (SILPrintDebugInfoVerbose) {
|
||||
if (Loc.isImplicit())
|
||||
*this << " isImplicit: " << "true";
|
||||
else
|
||||
*this << " isImplicit: " << "false";
|
||||
|
||||
if (Loc.isAutoGenerated())
|
||||
*this << ", isAutoGenerated: " << "true";
|
||||
else
|
||||
*this << ", isAutoGenerated: " << "false";
|
||||
|
||||
if (Loc.isHiddenFromDebugInfo())
|
||||
*this << ", isHiddenFromDebugInfo: " << "true";
|
||||
else
|
||||
*this << ", isHiddenFromDebugInfo: " << "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user