summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARFFormValue.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-10-28 23:41:49 +0000
committerAlexey Samsonov <samsonov@google.com>2013-10-28 23:41:49 +0000
commita56bbf0c8cac571c0d9a49f6fa3d1e349a8653fe (patch)
tree9f7ce0e9c02dd9d4e7d456034b89ba04900c86b2 /llvm/lib/DebugInfo/DWARFFormValue.cpp
parent5e9ed7cf1db8e614be4968a981e1ba0e43d21d16 (diff)
downloadbcm5719-llvm-a56bbf0c8cac571c0d9a49f6fa3d1e349a8653fe.tar.gz
bcm5719-llvm-a56bbf0c8cac571c0d9a49f6fa3d1e349a8653fe.zip
DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.
llvm-svn: 193560
Diffstat (limited to 'llvm/lib/DebugInfo/DWARFFormValue.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARFFormValue.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARFFormValue.cpp b/llvm/lib/DebugInfo/DWARFFormValue.cpp
index 1a59dd8d0cf..b07f2755e93 100644
--- a/llvm/lib/DebugInfo/DWARFFormValue.cpp
+++ b/llvm/lib/DebugInfo/DWARFFormValue.cpp
@@ -62,8 +62,8 @@ static uint8_t getRefAddrSize(uint8_t AddrSize, uint16_t Version) {
return (Version == 2) ? AddrSize : 4;
}
-const uint8_t *
-DWARFFormValue::getFixedFormSizes(uint8_t AddrSize, uint16_t Version) {
+ArrayRef<uint8_t> DWARFFormValue::getFixedFormSizes(uint8_t AddrSize,
+ uint16_t Version) {
uint8_t RefAddrSize = getRefAddrSize(AddrSize, Version);
if (AddrSize == 4 && RefAddrSize == 4)
return FixedFormSizes<4, 4>::sizes;
@@ -73,7 +73,7 @@ DWARFFormValue::getFixedFormSizes(uint8_t AddrSize, uint16_t Version) {
return FixedFormSizes<8, 4>::sizes;
if (AddrSize == 8 && RefAddrSize == 8)
return FixedFormSizes<8, 8>::sizes;
- return 0;
+ return None;
}
static const DWARFFormValue::FormClass DWARF4FormClasses[] = {
OpenPOWER on IntegriCloud