Rename a method to match what it really does.

s/addVariableAddress/addFrameVariableAddress/g


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2011-04-25 23:02:17 +00:00
parent 80925f5dca
commit b865d46d95
3 changed files with 10 additions and 8 deletions

View File

@ -192,9 +192,10 @@ void CompileUnit::addSourceLine(DIE *Die, DINameSpace NS) {
addUInt(Die, dwarf::DW_AT_decl_line, 0, Line);
}
/// addVariableAddress - Add DW_AT_location attribute for a DbgVariable based
/// on provided frame index.
void CompileUnit::addVariableAddress(DbgVariable *&DV, DIE *Die, int64_t FI) {
/// addFrameVariableAddress - Add DW_AT_location attribute for a
/// DbgVariable based on provided frame index.
void CompileUnit::addFrameVariableAddress(DbgVariable *&DV, DIE *Die,
int64_t FI) {
MachineLocation Location;
unsigned FrameReg;
const TargetFrameLowering *TFI = Asm->TM.getFrameLowering();

View File

@ -212,9 +212,9 @@ public:
void addBlockByrefAddress(DbgVariable *&DV, DIE *Die, unsigned Attribute,
const MachineLocation &Location);
/// addVariableAddress - Add DW_AT_location attribute for a DbgVariable based
/// on provided frame index.
void addVariableAddress(DbgVariable *&DV, DIE *Die, int64_t FI);
/// addFrameVariableAddress - Add DW_AT_location attribute for a DbgVariable
/// based on provided frame index.
void addFrameVariableAddress(DbgVariable *&DV, DIE *Die, int64_t FI);
/// addToContextOwner - Add Die into the list of its context owner's children.
void addToContextOwner(DIE *Die, DIDescriptor Context);

View File

@ -696,7 +696,8 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, DbgScope *Scope) {
const TargetRegisterInfo *TRI = Asm->TM.getRegisterInfo();
if (DVInsn->getOperand(1).isImm() &&
TRI->getFrameRegister(*Asm->MF) == RegOp.getReg()) {
TheCU->addVariableAddress(DV, VariableDie, DVInsn->getOperand(1).getImm());
TheCU->addFrameVariableAddress(DV, VariableDie,
DVInsn->getOperand(1).getImm());
updated = true;
} else
updated = TheCU->addRegisterAddress(VariableDie, RegOp);
@ -730,7 +731,7 @@ DIE *DwarfDebug::constructVariableDIE(DbgVariable *DV, DbgScope *Scope) {
// .. else use frame index, if available.
int FI = 0;
if (findVariableFrameIndex(DV, &FI))
TheCU->addVariableAddress(DV, VariableDie, FI);
TheCU->addFrameVariableAddress(DV, VariableDie, FI);
DV->setDIE(VariableDie);
return VariableDie;