[dsymutil] Handle the -oso-prepend-path option when the input is a YAML debug map

All the tests using a YAML debug map will need this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Frederic Riss
2015-06-05 16:35:44 +00:00
parent b6ebf678ac
commit 8a5883aabe
4 changed files with 12 additions and 7 deletions

View File

@@ -243,13 +243,13 @@ void MachODebugMapParser::loadMainBinarySymbols() {
}
ErrorOr<std::unique_ptr<DebugMap>>
parseYAMLDebugMap(StringRef InputFile, bool Verbose) {
parseYAMLDebugMap(StringRef InputFile, StringRef PrependPath, bool Verbose) {
auto ErrOrFile = MemoryBuffer::getFileOrSTDIN(InputFile);
if (auto Err =ErrOrFile.getError())
return Err;
std::unique_ptr<DebugMap> Res;
yaml::Input yin((*ErrOrFile)->getBuffer());
yaml::Input yin((*ErrOrFile)->getBuffer(), &PrependPath);
yin >> Res;
if (auto EC = yin.error())
@@ -266,7 +266,7 @@ parseDebugMap(StringRef InputFile, StringRef PrependPath, bool Verbose, bool Inp
MachODebugMapParser Parser(InputFile, PrependPath, Verbose);
return Parser.parse();
} else {
return parseYAMLDebugMap(InputFile, Verbose);
return parseYAMLDebugMap(InputFile, PrependPath, Verbose);
}
}
}