mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add PrettyStackTraceSwiftVersion, and use it in the swiftc executable (#24235)
As pointed out on a recent JIRA, crash traces don't mention what version of Swift you were running. Usually that can be gleaned from the path, but not always.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "swift/Basic/PrettyStackTrace.h"
|
||||
#include "swift/Basic/QuotedString.h"
|
||||
#include "swift/Basic/Version.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
@@ -33,3 +34,7 @@ void PrettyStackTraceFileContents::print(llvm::raw_ostream &out) const {
|
||||
out << '\n';
|
||||
out << "---\n";
|
||||
}
|
||||
|
||||
void PrettyStackTraceSwiftVersion::print(llvm::raw_ostream &out) const {
|
||||
out << version::getSwiftFullVersion() << '\n';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user