mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
[DWARF] NFC: Give DwarfFormat a 1-byte base type.
In particular this reduces DWARFFormParams from 64 to 32 bits; pass it around by value. llvm-svn: 306324
This commit is contained in:
parent
9f111d1ec1
commit
e6a67cc681
@ -484,7 +484,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// Constants that define the DWARF format as 32 or 64 bit.
|
/// Constants that define the DWARF format as 32 or 64 bit.
|
||||||
enum DwarfFormat { DWARF32, DWARF64 };
|
enum DwarfFormat : uint8_t { DWARF32, DWARF64 };
|
||||||
|
|
||||||
} // End of namespace dwarf
|
} // End of namespace dwarf
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ public:
|
|||||||
/// \returns Optional<uint8_t> value with the fixed byte size or None if
|
/// \returns Optional<uint8_t> value with the fixed byte size or None if
|
||||||
/// \p Form doesn't have a fixed byte size.
|
/// \p Form doesn't have a fixed byte size.
|
||||||
static Optional<uint8_t> getFixedByteSize(dwarf::Form Form,
|
static Optional<uint8_t> getFixedByteSize(dwarf::Form Form,
|
||||||
const DWARFFormParams &FormParams);
|
const DWARFFormParams FormParams);
|
||||||
|
|
||||||
/// Skip a form's value in \p DebugInfoData at the offset specified by
|
/// Skip a form's value in \p DebugInfoData at the offset specified by
|
||||||
/// \p OffsetPtr.
|
/// \p OffsetPtr.
|
||||||
@ -154,7 +154,7 @@ public:
|
|||||||
/// \param Params DWARF parameters to help interpret forms.
|
/// \param Params DWARF parameters to help interpret forms.
|
||||||
/// \returns true on success, false if the form was not skipped.
|
/// \returns true on success, false if the form was not skipped.
|
||||||
bool skipValue(DataExtractor DebugInfoData, uint32_t *OffsetPtr,
|
bool skipValue(DataExtractor DebugInfoData, uint32_t *OffsetPtr,
|
||||||
const DWARFFormParams &Params) const {
|
const DWARFFormParams Params) const {
|
||||||
return DWARFFormValue::skipValue(Form, DebugInfoData, OffsetPtr, Params);
|
return DWARFFormValue::skipValue(Form, DebugInfoData, OffsetPtr, Params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ public:
|
|||||||
/// \param FormParams DWARF parameters to help interpret forms.
|
/// \param FormParams DWARF parameters to help interpret forms.
|
||||||
/// \returns true on success, false if the form was not skipped.
|
/// \returns true on success, false if the form was not skipped.
|
||||||
static bool skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
|
static bool skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
|
||||||
uint32_t *OffsetPtr, const DWARFFormParams &FormParams);
|
uint32_t *OffsetPtr, const DWARFFormParams FormParams);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void dumpString(raw_ostream &OS) const;
|
void dumpString(raw_ostream &OS) const;
|
||||||
|
@ -61,7 +61,7 @@ static const DWARFFormValue::FormClass DWARF4FormClasses[] = {
|
|||||||
|
|
||||||
Optional<uint8_t>
|
Optional<uint8_t>
|
||||||
DWARFFormValue::getFixedByteSize(dwarf::Form Form,
|
DWARFFormValue::getFixedByteSize(dwarf::Form Form,
|
||||||
const DWARFFormParams &Params) {
|
const DWARFFormParams Params) {
|
||||||
switch (Form) {
|
switch (Form) {
|
||||||
case DW_FORM_addr:
|
case DW_FORM_addr:
|
||||||
assert(Params.Version && Params.AddrSize && "Invalid Params for form");
|
assert(Params.Version && Params.AddrSize && "Invalid Params for form");
|
||||||
@ -146,7 +146,7 @@ DWARFFormValue::getFixedByteSize(dwarf::Form Form,
|
|||||||
|
|
||||||
bool DWARFFormValue::skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
|
bool DWARFFormValue::skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
|
||||||
uint32_t *OffsetPtr,
|
uint32_t *OffsetPtr,
|
||||||
const DWARFFormParams &Params) {
|
const DWARFFormParams Params) {
|
||||||
bool Indirect = false;
|
bool Indirect = false;
|
||||||
do {
|
do {
|
||||||
switch (Form) {
|
switch (Form) {
|
||||||
|
Loading…
Reference in New Issue
Block a user