Move variable only used in an assert into the assert.

This prevents unused variable warnings when building without asserts.
This commit is contained in:
Sterling Augustine 2021-02-18 13:00:49 -08:00
parent 4045ad6b0c
commit 4544a63b77
1 changed files with 2 additions and 2 deletions

View File

@ -981,8 +981,8 @@ struct CounterCoverageMappingBuilder
bool UnnestStart = StartDepth >= EndDepth;
bool UnnestEnd = EndDepth >= StartDepth;
if (UnnestEnd) {
SourceLocation NestedLoc = getStartOfFileOrMacro(BeforeLoc);
assert(SM.isWrittenInSameFile(NestedLoc, BeforeLoc));
assert(SM.isWrittenInSameFile(getStartOfFileOrMacro(BeforeLoc),
BeforeLoc));
BeforeLoc = getIncludeOrExpansionLoc(BeforeLoc);
assert(BeforeLoc.isValid());