/// EmitValue - Emit value via the Dwarf writer.
///
- void EmitValue(const AsmPrinter *AP, dwarf::Form Form) const;
+ void EmitValue(const AsmPrinter *AP) const;
/// SizeOf - Return the size of a value in bytes.
///
- unsigned SizeOf(const AsmPrinter *AP, dwarf::Form Form) const;
+ unsigned SizeOf(const AsmPrinter *AP) const;
#ifndef NDEBUG
void print(raw_ostream &O) const;
// Emit the DIE attribute values.
for (const auto &V : Die.values()) {
dwarf::Attribute Attr = V.getAttribute();
- dwarf::Form Form = V.getForm();
- assert(Form && "Too many attributes for DIE (check abbreviation)");
+ assert(V.getForm() && "Too many attributes for DIE (check abbreviation)");
if (isVerbose()) {
OutStreamer->AddComment(dwarf::AttributeString(Attr));
}
// Emit an attribute using the defined form.
- V.EmitValue(this, Form);
+ V.EmitValue(this);
}
// Emit the DIE children if any.
}
#endif
-void DIEValue::EmitValue(const AsmPrinter *AP, dwarf::Form Form) const {
+void DIEValue::EmitValue(const AsmPrinter *AP) const {
switch (Ty) {
case isNone:
llvm_unreachable("Expected valid DIEValue");
}
}
-unsigned DIEValue::SizeOf(const AsmPrinter *AP, dwarf::Form Form) const {
+unsigned DIEValue::SizeOf(const AsmPrinter *AP) const {
switch (Ty) {
case isNone:
llvm_unreachable("Expected valid DIEValue");
///
unsigned DIELoc::ComputeSize(const AsmPrinter *AP) const {
if (!Size) {
- for (unsigned i = 0, N = Values.size(); i < N; ++i)
- Size += Values[i].SizeOf(AP, Values[i].getForm());
+ for (const auto &V : Values)
+ Size += V.SizeOf(AP);
}
return Size;
Asm->EmitULEB128(Size); break;
}
- for (unsigned i = 0, N = Values.size(); i < N; ++i)
- Values[i].EmitValue(Asm, Values[i].getForm());
+ for (const auto &V : Values)
+ V.EmitValue(Asm);
}
/// SizeOf - Determine size of location data in bytes.
///
unsigned DIEBlock::ComputeSize(const AsmPrinter *AP) const {
if (!Size) {
- for (unsigned i = 0, N = Values.size(); i < N; ++i)
- Size += Values[i].SizeOf(AP, Values[i].getForm());
+ for (const auto &V : Values)
+ Size += V.SizeOf(AP);
}
return Size;
case dwarf::DW_FORM_block: Asm->EmitULEB128(Size); break;
}
- for (unsigned i = 0, N = Values.size(); i < N; ++i)
- Values[i].EmitValue(Asm, Values[i].getForm());
+ for (const auto &V : Values)
+ V.EmitValue(Asm);
}
/// SizeOf - Determine size of block data in bytes.