llvm.org GIT mirror llvm / d2381bc
[DWARF] NFC: Give DwarfFormat a 1-byte base type. In particular this reduces DWARFFormParams from 64 to 32 bits; pass it around by value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306324 91177308-0d34-0410-b5e6-96231b3b80d8 Paul Robinson 3 years ago
3 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
483483 };
484484
485485 /// Constants that define the DWARF format as 32 or 64 bit.
486 enum DwarfFormat { DWARF32, DWARF64 };
486 enum DwarfFormat : uint8_t { DWARF32, DWARF64 };
487487
488488 } // End of namespace dwarf
489489
141141 /// \returns Optional value with the fixed byte size or None if
142142 /// \p Form doesn't have a fixed byte size.
143143 static Optional getFixedByteSize(dwarf::Form Form,
144 const DWARFFormParams &FormParams);
144 const DWARFFormParams FormParams);
145145
146146 /// Skip a form's value in \p DebugInfoData at the offset specified by
147147 /// \p OffsetPtr.
153153 /// \param Params DWARF parameters to help interpret forms.
154154 /// \returns true on success, false if the form was not skipped.
155155 bool skipValue(DataExtractor DebugInfoData, uint32_t *OffsetPtr,
156 const DWARFFormParams &Params) const {
156 const DWARFFormParams Params) const {
157157 return DWARFFormValue::skipValue(Form, DebugInfoData, OffsetPtr, Params);
158158 }
159159
168168 /// \param FormParams DWARF parameters to help interpret forms.
169169 /// \returns true on success, false if the form was not skipped.
170170 static bool skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
171 uint32_t *OffsetPtr, const DWARFFormParams &FormParams);
171 uint32_t *OffsetPtr, const DWARFFormParams FormParams);
172172
173173 private:
174174 void dumpString(raw_ostream &OS) const;
6060
6161 Optional
6262 DWARFFormValue::getFixedByteSize(dwarf::Form Form,
63 const DWARFFormParams &Params) {
63 const DWARFFormParams Params) {
6464 switch (Form) {
6565 case DW_FORM_addr:
6666 assert(Params.Version && Params.AddrSize && "Invalid Params for form");
145145
146146 bool DWARFFormValue::skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
147147 uint32_t *OffsetPtr,
148 const DWARFFormParams &Params) {
148 const DWARFFormParams Params) {
149149 bool Indirect = false;
150150 do {
151151 switch (Form) {