mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
8deab9c7ea
* Drop unused argument names from function prototypes * Make `static` some methods * Disable some copy constructors * Fix casing of Doxygen `\file` directives * Add some casts to make the compiler happy * Initialize `hasRelocationAddend` for AArch64 * Use references in range-for where possible * Drop default for `switch` statements covering all the entries of an `enum` * Make some global variables `static` * Drop dead functions
34 lines
855 B
C++
34 lines
855 B
C++
/// \file CommandLine.cpp
|
|
/// \brief Implementation of the debug framework
|
|
|
|
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
// Standard includes
|
|
#include <fstream>
|
|
#include <iostream>
|
|
|
|
// Local libraries includes
|
|
#include "revng/Support/CommandLine.h"
|
|
|
|
namespace cl = llvm::cl;
|
|
|
|
cl::OptionCategory MainCategory("Options", "");
|
|
|
|
cl::opt<bool> UseDebugSymbols("use-debug-symbols",
|
|
cl::desc("use section and symbol function "
|
|
"informations, if available"),
|
|
cl::cat(MainCategory));
|
|
|
|
std::ostream &pathToStream(const std::string &Path, std::ofstream &File) {
|
|
if (Path[0] == '-' && Path[1] == '\0') {
|
|
return std::cout;
|
|
} else {
|
|
if (File.is_open())
|
|
File.close();
|
|
File.open(Path);
|
|
return File;
|
|
}
|
|
}
|