Files
revng-revng/lib/Support/CommandLine.cpp
T
Alessandro Di Federico 8deab9c7ea Whitespace and other minor changes
* 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
2020-05-14 11:58:18 +02:00

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;
}
}