From 19b68ddda190439ba941fa75475da25cdb2c6b6e Mon Sep 17 00:00:00 2001 From: Frederic Riss Date: Tue, 16 Dec 2014 20:22:11 +0000 Subject: [PATCH] [dsymutil] Pass the verbosity flag down to the processing. NFC for now. llvm-svn: 224361 --- llvm/tools/dsymutil/DwarfLinker.cpp | 2 +- llvm/tools/dsymutil/MachODebugMapParser.cpp | 3 ++- llvm/tools/dsymutil/dsymutil.cpp | 4 ++-- llvm/tools/dsymutil/dsymutil.h | 6 ++++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp index f1ad875..ad47105 100644 --- a/llvm/tools/dsymutil/DwarfLinker.cpp +++ b/llvm/tools/dsymutil/DwarfLinker.cpp @@ -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; } diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp index c67e90c..6fabe00 100644 --- a/llvm/tools/dsymutil/MachODebugMapParser.cpp +++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp @@ -240,7 +240,8 @@ void MachODebugMapParser::loadMainBinarySymbols() { namespace llvm { namespace dsymutil { llvm::ErrorOr> parseDebugMap(StringRef InputFile, - StringRef PrependPath) { + StringRef PrependPath, + bool Verbose) { MachODebugMapParser Parser(InputFile, PrependPath); return Parser.parse(); } diff --git a/llvm/tools/dsymutil/dsymutil.cpp b/llvm/tools/dsymutil/dsymutil.cpp index 4eaa67b..8f1c47b 100644 --- a/llvm/tools/dsymutil/dsymutil.cpp +++ b/llvm/tools/dsymutil/dsymutil.cpp @@ -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); } diff --git a/llvm/tools/dsymutil/dsymutil.h b/llvm/tools/dsymutil/dsymutil.h index 83d9a39..9203bea 100644 --- a/llvm/tools/dsymutil/dsymutil.h +++ b/llvm/tools/dsymutil/dsymutil.h @@ -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> -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 -- 2.7.4