Switch to consumeError(), since this can crash otherwise.

Summary:
If assertions are disabled, but LLVM_ABI_BREAKING_CHANGES is enabled,
this will cause an issue with an unchecked Success. Switching to
consumeError() is the correct way to bypass the check.

Reviewers: llvm-commits, cfe-commits, arphaman

Reviewed By: arphaman

Subscribers: arphaman, klimek, pirama

Differential Revision: https://reviews.llvm.org/D36728

llvm-svn: 310958
This commit is contained in:
Stephen Hines 2017-08-15 21:20:41 +00:00
parent c0301b2f53
commit 14ccaedbb8
1 changed files with 1 additions and 1 deletions

View File

@ -503,7 +503,7 @@ calculateRangesAfterReplacements(const Replacements &Replaces,
std::string(R.getLength(), ' ')));
assert(!Err &&
"Replacements must not conflict since ranges have been merged.");
(void)Err;
llvm::consumeError(std::move(Err));
}
return FakeReplaces.merge(Replaces).getAffectedRanges();
}