[dsymutil] Pass the verbosity flag down to the processing. NFC for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224361 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Frederic Riss 2014-12-16 20:22:11 +00:00
parent aabd6c1ce8
commit f3ab9b9e63
4 changed files with 9 additions and 6 deletions

View File

@ -12,7 +12,7 @@
namespace llvm {
namespace dsymutil {
bool linkDwarf(StringRef OutputFilename, const DebugMap &DM) {
bool linkDwarf(StringRef OutputFilename, const DebugMap &DM, bool Verbose) {
// Do nothing for now.
return true;
}

View File

@ -240,7 +240,8 @@ void MachODebugMapParser::loadMainBinarySymbols() {
namespace llvm {
namespace dsymutil {
llvm::ErrorOr<std::unique_ptr<DebugMap>> parseDebugMap(StringRef InputFile,
StringRef PrependPath) {
StringRef PrependPath,
bool Verbose) {
MachODebugMapParser Parser(InputFile, PrependPath);
return Parser.parse();
}

View File

@ -51,7 +51,7 @@ int main(int argc, char **argv) {
llvm::llvm_shutdown_obj Shutdown;
llvm::cl::ParseCommandLineOptions(argc, argv, "llvm dsymutil\n");
auto DebugMapPtrOrErr = parseDebugMap(InputFile, OsoPrependPath);
auto DebugMapPtrOrErr = parseDebugMap(InputFile, OsoPrependPath, Verbose);
if (auto EC = DebugMapPtrOrErr.getError()) {
llvm::errs() << "error: cannot parse the debug map for \"" << InputFile
@ -69,5 +69,5 @@ int main(int argc, char **argv) {
if (OutputBasename == "-")
OutputBasename = "a.out";
return !linkDwarf(OutputBasename + ".dwarf", **DebugMapPtrOrErr);
return !linkDwarf(OutputBasename + ".dwarf", **DebugMapPtrOrErr, Verbose);
}

View File

@ -26,12 +26,14 @@ namespace dsymutil {
/// \brief Extract the DebugMap from the given file.
/// The file has to be a MachO object file.
llvm::ErrorOr<std::unique_ptr<DebugMap>>
parseDebugMap(StringRef InputFile, StringRef PrependPath = "");
parseDebugMap(StringRef InputFile, StringRef PrependPath = "",
bool Verbose = false);
/// \brief Link the Dwarf debuginfo as directed by the passed DebugMap
/// \p DM into a DwarfFile named \p OutputFilename.
/// \returns false if the link failed.
bool linkDwarf(StringRef OutputFilename, const DebugMap &DM);
bool linkDwarf(StringRef OutputFilename, const DebugMap &DM,
bool Verbose = false);
}
}
#endif // LLVM_TOOLS_DSYMUTIL_DSYMUTIL_H