Build fixes for pdb-diff test.

llvm-svn: 307556
This commit is contained in:
Zachary Turner 2017-07-10 17:01:28 +00:00
parent 6da7a3058e
commit e80c0bf6d7
1 changed files with 3 additions and 3 deletions

View File

@ -101,8 +101,8 @@ struct BinaryPathProvider {
SmallString<64> removeRoot(StringRef Path, bool IsRight) const {
SmallString<64> Native(Path);
SmallString<64> Root =
IsRight ? opts::diff::RightRoot : opts::diff::LeftRoot;
auto &RootOpt = IsRight ? opts::diff::RightRoot : opts::diff::LeftRoot;
SmallString<64> Root(static_cast<std::string>(RootOpt));
// pdb paths always use windows syntax, convert slashes to backslashes.
sys::path::native(Root, sys::path::Style::windows);
if (sys::path::has_stem(Root, sys::path::Style::windows))
@ -449,7 +449,7 @@ diffOneModule(DiffPrinter &D,
BinaryPathProvider PathProvider(28);
auto Iter = llvm::find_if(
Other, [&Item, &PathProvider, ItemIsRight,
Other, [&PathProvider, ItemIsRight,
L](const std::pair<uint32_t, DbiModuleDescriptor> &Other) {
const auto *Left = L;
const auto *Right = &Other;