Skip to content

Commit

Permalink
[dsymutil] Pass the verbosity flag down to the processing. NFC for now.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224361 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
fredriss committed Dec 16, 2014
1 parent aabd6c1 commit f3ab9b9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tools/dsymutil/DwarfLinker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion tools/dsymutil/MachODebugMapParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
4 changes: 2 additions & 2 deletions tools/dsymutil/dsymutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}
6 changes: 4 additions & 2 deletions tools/dsymutil/dsymutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f3ab9b9

Please sign in to comment.