Roll DbgVariable::setMInsn into the constructor. No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl
2014-05-30 21:10:13 +00:00
parent 26476d32d3
commit e457dc7ceb
2 changed files with 15 additions and 8 deletions

View File

@ -1176,15 +1176,13 @@ DwarfDebug::collectVariableInfo(SmallPtrSet<const MDNode *, 16> &Processed) {
const MachineInstr *MInsn = Ranges.front().first;
assert(MInsn->isDebugValue() && "History must begin with debug value");
DbgVariable *AbsVar = findAbstractVariable(DV, MInsn->getDebugLoc());
DbgVariable *RegVar = new DbgVariable(DV, AbsVar, this);
DbgVariable *RegVar = new DbgVariable(MInsn, AbsVar, this);
if (!addCurrentFnArgument(RegVar, Scope))
addScopeVariable(Scope, RegVar);
// Check if the first DBG_VALUE is valid for the rest of the function.
if (Ranges.size() == 1 && Ranges.front().second == nullptr) {
RegVar->setMInsn(MInsn);
if (Ranges.size() == 1 && Ranges.front().second == nullptr)
continue;
}
// Handle multiple DBG_VALUE instructions describing one variable.
RegVar->setDotDebugLocOffset(DotDebugLocEntries.size());