mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Make DWARFDebugLine use StringRef for directory/file tables. NFC
Differential Revision: http://reviews.llvm.org/D32728 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -128,6 +128,16 @@ const char *DataExtractor::getCStr(uint32_t *offset_ptr) const {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
StringRef DataExtractor::getCStrRef(uint32_t *OffsetPtr) const {
|
||||
uint32_t Start = *OffsetPtr;
|
||||
StringRef::size_type Pos = Data.find('\0', Start);
|
||||
if (Pos != StringRef::npos) {
|
||||
*OffsetPtr = Pos + 1;
|
||||
return StringRef(Data.data() + Start, Pos - Start);
|
||||
}
|
||||
return StringRef();
|
||||
}
|
||||
|
||||
uint64_t DataExtractor::getULEB128(uint32_t *offset_ptr) const {
|
||||
uint64_t result = 0;
|
||||
if (Data.empty())
|
||||
|
||||
Reference in New Issue
Block a user