aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h b/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
index 10019a4720e6..0515173b4a24 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DebugLocStream.h
@@ -109,19 +109,18 @@ public:
ArrayRef<Entry> getEntries(const List &L) const {
size_t LI = getIndex(L);
- return makeArrayRef(Entries)
- .slice(Lists[LI].EntryOffset, getNumEntries(LI));
+ return ArrayRef(Entries).slice(Lists[LI].EntryOffset, getNumEntries(LI));
}
ArrayRef<char> getBytes(const Entry &E) const {
size_t EI = getIndex(E);
- return makeArrayRef(DWARFBytes.begin(), DWARFBytes.end())
+ return ArrayRef(DWARFBytes.begin(), DWARFBytes.end())
.slice(Entries[EI].ByteOffset, getNumBytes(EI));
}
ArrayRef<std::string> getComments(const Entry &E) const {
size_t EI = getIndex(E);
- return makeArrayRef(Comments)
- .slice(Entries[EI].CommentOffset, getNumComments(EI));
+ return ArrayRef(Comments).slice(Entries[EI].CommentOffset,
+ getNumComments(EI));
}
private:
@@ -159,13 +158,13 @@ class DebugLocStream::ListBuilder {
DbgVariable &V;
const MachineInstr &MI;
size_t ListIndex;
- Optional<uint8_t> TagOffset;
+ std::optional<uint8_t> TagOffset;
public:
ListBuilder(DebugLocStream &Locs, DwarfCompileUnit &CU, AsmPrinter &Asm,
DbgVariable &V, const MachineInstr &MI)
: Locs(Locs), Asm(Asm), V(V), MI(MI), ListIndex(Locs.startList(&CU)),
- TagOffset(None) {}
+ TagOffset(std::nullopt) {}
void setTagOffset(uint8_t TO) {
TagOffset = TO;