mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-22 09:29:31 +00:00
Make sure to print a stack trace whenever an error signal is delivered to the
tool. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11632 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
982774cbeb
commit
f73b4ca7f9
@ -15,6 +15,7 @@
|
|||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
#include "Support/FileUtilities.h"
|
#include "Support/FileUtilities.h"
|
||||||
|
#include "Support/Signals.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
@ -544,9 +545,9 @@ void parseCL() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
//Parse Command line options
|
|
||||||
cl::ParseCommandLineOptions(argc, argv);
|
cl::ParseCommandLineOptions(argc, argv);
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
parseCL();
|
parseCL();
|
||||||
|
|
||||||
//Create archive!
|
//Create archive!
|
||||||
|
@ -45,6 +45,7 @@ DisableVerify("disable-verify", cl::Hidden,
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
std::ostream *Out = 0;
|
std::ostream *Out = 0;
|
||||||
try {
|
try {
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "CLIDebugger.h"
|
#include "CLIDebugger.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
|
#include "Support/Signals.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
@ -51,6 +52,7 @@ namespace {
|
|||||||
int main(int argc, char **argv, char * const *envp) {
|
int main(int argc, char **argv, char * const *envp) {
|
||||||
cl::ParseCommandLineOptions(argc, argv,
|
cl::ParseCommandLineOptions(argc, argv,
|
||||||
" llvm source-level debugger\n");
|
" llvm source-level debugger\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
if (Version || !Quiet) {
|
if (Version || !Quiet) {
|
||||||
std::cout << "llvm-db: The LLVM source-level debugger\n";
|
std::cout << "llvm-db: The LLVM source-level debugger\n";
|
||||||
|
@ -53,6 +53,8 @@ WriteMode(cl::desc("Specify the output format:"),
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv, " llvm .bc -> .ll disassembler\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm .bc -> .ll disassembler\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
std::ostream *Out = &std::cout; // Default to printing to stdout...
|
std::ostream *Out = &std::cout; // Default to printing to stdout...
|
||||||
std::string ErrorMessage;
|
std::string ErrorMessage;
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ static inline std::auto_ptr<Module> LoadFile(const std::string &FN) {
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv, " llvm linker\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm linker\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
assert(InputFilenames.size() > 0 && "OneOrMore is not working");
|
assert(InputFilenames.size() > 0 && "OneOrMore is not working");
|
||||||
|
|
||||||
unsigned BaseArg = 0;
|
unsigned BaseArg = 0;
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
#include "Support/FileUtilities.h"
|
#include "Support/FileUtilities.h"
|
||||||
|
#include "Support/Signals.h"
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
@ -146,6 +147,8 @@ void DumpSymbolNamesFromFile (std::string &Filename) {
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv, " llvm symbol table dumper\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm symbol table dumper\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
ToolName = argv[0];
|
ToolName = argv[0];
|
||||||
if (BSDFormat) OutputFormat = bsd;
|
if (BSDFormat) OutputFormat = bsd;
|
||||||
if (POSIXFormat) OutputFormat = posix;
|
if (POSIXFormat) OutputFormat = posix;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
#include "llvm/Analysis/ProfileInfoLoader.h"
|
#include "llvm/Analysis/ProfileInfoLoader.h"
|
||||||
#include "llvm/Bytecode/Reader.h"
|
#include "llvm/Bytecode/Reader.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
|
#include "Support/Signals.h"
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
@ -80,6 +81,7 @@ namespace {
|
|||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv, " llvm profile dump decoder\n");
|
cl::ParseCommandLineOptions(argc, argv, " llvm profile dump decoder\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
// Read in the bytecode file...
|
// Read in the bytecode file...
|
||||||
std::string ErrorMessage;
|
std::string ErrorMessage;
|
||||||
|
@ -72,6 +72,7 @@ QuietA("quiet", cl::desc("Alias for -q"), cl::aliasopt(Quiet));
|
|||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
cl::ParseCommandLineOptions(argc, argv,
|
cl::ParseCommandLineOptions(argc, argv,
|
||||||
" llvm .bc -> .bc modular optimizer\n");
|
" llvm .bc -> .bc modular optimizer\n");
|
||||||
|
PrintStackTraceOnErrorSignal();
|
||||||
|
|
||||||
// Allocate a full target machine description only if necessary...
|
// Allocate a full target machine description only if necessary...
|
||||||
// FIXME: The choice of target should be controllable on the command line.
|
// FIXME: The choice of target should be controllable on the command line.
|
||||||
|
Loading…
Reference in New Issue
Block a user