Do not bind a non-const reference to a rvalue. NFC.

MSVC warns with:
warning C4239: nonstandard extension used: 'initializing': conversion from 'llvm::DebugLoc' to 'llvm::DebugLoc &'
note: A non-const reference may only be bound to an lvalue

Change the reference to a const reference.

llvm-svn: 265937
This commit is contained in:
Michael Kruse 2016-04-11 13:24:29 +00:00
parent c869e9158d
commit 7071e8b355
1 changed files with 3 additions and 2 deletions

View File

@ -605,8 +605,9 @@ void MemoryAccess::assumeNoOutOfBound() {
// bail out more often than strictly necessary.
Outside = isl_set_remove_divs(Outside);
Outside = isl_set_complement(Outside);
auto &Loc = getAccessInstruction() ? getAccessInstruction()->getDebugLoc()
: DebugLoc();
const auto &Loc = getAccessInstruction()
? getAccessInstruction()->getDebugLoc()
: DebugLoc();
Statement->getParent()->addAssumption(INBOUNDS, Outside, Loc, AS_ASSUMPTION);
isl_space_free(Space);
}