Changeset View
Changeset View
Standalone View
Standalone View
lib/CodeGen/AsmPrinter/DebugLocEntry.h
Context not available. | |||||
#ifndef CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H__ | #ifndef CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H__ | ||||
#define CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H__ | #define CODEGEN_ASMPRINTER_DEBUGLOCENTRY_H__ | ||||
#include "llvm/IR/Constants.h" | #include "llvm/IR/Constants.h" | ||||
#include "llvm/IR/DebugInfo.h" | |||||
#include "llvm/MC/MachineLocation.h" | #include "llvm/MC/MachineLocation.h" | ||||
#include "llvm/MC/MCSymbol.h" | #include "llvm/MC/MCSymbol.h" | ||||
echristo: This appears unused. | |||||
Context not available. | |||||
/// share the same Loc/Constant and if Next immediately follows this | /// share the same Loc/Constant and if Next immediately follows this | ||||
/// Entry. | /// Entry. | ||||
bool Merge(const DebugLocEntry &Next) { | bool Merge(const DebugLocEntry &Next) { | ||||
// If this and Next are describing pieces of the same variable | |||||
// merge them by appending next's values to the current list of values. | |||||
Not Done ReplyInline ActionsDescription of the logic here? echristo: Description of the logic here? | |||||
if (Begin == Next.Begin && Values.size() > 0 && Next.Values.size() > 0) { | |||||
DIVariable Var(Values[0].Variable); | |||||
DIVariable NextVar(Next.Values[0].Variable); | |||||
if (Var.getName() == NextVar.getName() && | |||||
Var.isVariablePiece() && NextVar.isVariablePiece()) { | |||||
Values.append(Next.Values.begin(), Next.Values.end()); | |||||
End = Next.End; | |||||
return true; | |||||
} | |||||
} | |||||
if ((End == Next.Begin && Values == Next.Values)) { | if ((End == Next.Begin && Values == Next.Values)) { | ||||
End = Next.End; | End = Next.End; | ||||
return true; | return true; | ||||
} | } | ||||
return false; | return false; | ||||
} | } | ||||
const MCSymbol *getBeginSym() const { return Begin; } | const MCSymbol *getBeginSym() const { return Begin; } | ||||
const MCSymbol *getEndSym() const { return End; } | const MCSymbol *getEndSym() const { return End; } | ||||
const DwarfCompileUnit *getCU() const { return Unit; } | const DwarfCompileUnit *getCU() const { return Unit; } | ||||
const ArrayRef<Value> getValues() const { return Values; } | const ArrayRef<Value> getValues() const { return Values; } | ||||
void addValue(Value Val) { Values.push_back(Val); } | void addValue(Value Val) { | ||||
assert(DIVariable(Val.Variable).isVariablePiece() && | |||||
"multi-value DebugLocEntries must be pieces"); | |||||
Values.push_back(Val); | |||||
} | |||||
}; | }; | ||||
} | } | ||||
Context not available. |
This appears unused.