Revert "[dsymutil] Accept a YAML debug map as input instead of a binary."

This reverts commit r238941 while I figure out the bot issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238943 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Frederic Riss
2015-06-03 17:08:42 +00:00
parent 001b032fea
commit 57c68eeefe
6 changed files with 24 additions and 65 deletions

View File

@@ -242,32 +242,12 @@ void MachODebugMapParser::loadMainBinarySymbols() {
}
}
ErrorOr<std::unique_ptr<DebugMap>>
parseYAMLDebugMap(StringRef InputFile, bool Verbose) {
auto ErrOrFile = MemoryBuffer::getFileOrSTDIN(InputFile);
if (auto Err =ErrOrFile.getError())
return Err;
std::unique_ptr<DebugMap> Res;
yaml::Input yin((*ErrOrFile)->getBuffer());
yin >> Res;
if (auto EC = yin.error())
return EC;
return std::move(Res);
}
namespace llvm {
namespace dsymutil {
llvm::ErrorOr<std::unique_ptr<DebugMap>>
parseDebugMap(StringRef InputFile, StringRef PrependPath, bool Verbose, bool InputIsYAML) {
if (!InputIsYAML) {
MachODebugMapParser Parser(InputFile, PrependPath, Verbose);
return Parser.parse();
} else {
return parseYAMLDebugMap(InputFile, Verbose);
}
parseDebugMap(StringRef InputFile, StringRef PrependPath, bool Verbose) {
MachODebugMapParser Parser(InputFile, PrependPath, Verbose);
return Parser.parse();
}
}
}