summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2017-06-26 19:52:32 +0000
committerPaul Robinson <paul.robinson@sony.com>2017-06-26 19:52:32 +0000
commit36e85a867b448dec4ab805c869de1512cb1a7b2c (patch)
tree240f386c876a3012c0a9eddf590278ca9b4c42fe
parente8a3be4693eb3d00a352b3f930fbcc85bff3797f (diff)
downloadbcm5719-llvm-36e85a867b448dec4ab805c869de1512cb1a7b2c.tar.gz
bcm5719-llvm-36e85a867b448dec4ab805c869de1512cb1a7b2c.zip
[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
-rw-r--r--llvm/include/llvm/BinaryFormat/Dwarf.h2
-rw-r--r--llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h6
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/BinaryFormat/Dwarf.h b/llvm/include/llvm/BinaryFormat/Dwarf.h
index b7a056b1811..ab927565d05 100644
--- a/llvm/include/llvm/BinaryFormat/Dwarf.h
+++ b/llvm/include/llvm/BinaryFormat/Dwarf.h
@@ -484,7 +484,7 @@ private:
};
/// 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
diff --git a/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h b/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
index 47166311307..78fa6639db0 100644
--- a/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
+++ b/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h
@@ -142,7 +142,7 @@ public:
/// \returns Optional<uint8_t> value with the fixed byte size or None if
/// \p Form doesn't have a fixed byte size.
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
/// \p OffsetPtr.
@@ -154,7 +154,7 @@ public:
/// \param Params DWARF parameters to help interpret forms.
/// \returns true on success, false if the form was not skipped.
bool skipValue(DataExtractor DebugInfoData, uint32_t *OffsetPtr,
- const DWARFFormParams &Params) const {
+ const DWARFFormParams Params) const {
return DWARFFormValue::skipValue(Form, DebugInfoData, OffsetPtr, Params);
}
@@ -169,7 +169,7 @@ public:
/// \param FormParams DWARF parameters to help interpret forms.
/// \returns true on success, false if the form was not skipped.
static bool skipValue(dwarf::Form Form, DataExtractor DebugInfoData,
- uint32_t *OffsetPtr, const DWARFFormParams &FormParams);
+ uint32_t *OffsetPtr, const DWARFFormParams FormParams);
private:
void dumpString(raw_ostream &OS) const;
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
index dda4a0cdb31..861114bde1f 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -61,7 +61,7 @@ static const DWARFFormValue::FormClass DWARF4FormClasses[] = {
Optional<uint8_t>
DWARFFormValue::getFixedByteSize(dwarf::Form Form,
- const DWARFFormParams &Params) {
+ const DWARFFormParams Params) {
switch (Form) {
case DW_FORM_addr:
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,
uint32_t *OffsetPtr,
- const DWARFFormParams &Params) {
+ const DWARFFormParams Params) {
bool Indirect = false;
do {
switch (Form) {
OpenPOWER on IntegriCloud