mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
tools: Set Swift bug report message in some executable targets
If these programs crash, we want them to print the Swift bug report message, not the default LLVM one, which leads to https://github.com/llvm/llvm-project/issues. While here, hoist the setting of the bug report message to the START_PROGRAM macro so that we don't forget to set it in the future.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// This source file is part of the Swift.org open source project
|
||||
//
|
||||
// Copyright (c) 2022 Apple Inc. and the Swift project authors
|
||||
// Copyright (c) 2022 - 2025 Apple Inc. and the Swift project authors
|
||||
// Licensed under Apache License v2.0 with Runtime Library Exception
|
||||
//
|
||||
// See https://swift.org/LICENSE.txt for license information
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "swift-c/DependencyScan/DependencyScan.h"
|
||||
#include "swift/Basic/Defer.h"
|
||||
#include "swift/Basic/FileTypes.h"
|
||||
#include "swift/Basic/LLVMInitialize.h"
|
||||
#include "swift/DependencyScan/DependencyScanJSON.h"
|
||||
#include "swift/DependencyScan/StringUtils.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
@@ -283,6 +284,8 @@ createArgs(ArrayRef<std::string> Cmd, StringSaver &Saver, Actions Action) {
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
PROGRAM_START(argc, argv);
|
||||
|
||||
llvm::cl::HideUnrelatedOptions(Category);
|
||||
llvm::cl::ParseCommandLineOptions(argc, argv,
|
||||
"Test libSwiftScan interfaces\n");
|
||||
|
||||
Reference in New Issue
Block a user