From ea47ccc78f953d7201601ae1a9da64c6e7865f54 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 4 Dec 2022 18:57:52 +0000 Subject: [PATCH] [BOLT] Fix after DebugInfoMetadata change 0ca43d44888885d6caf7636db91fe810e822263c --- bolt/include/bolt/Core/BinaryContext.h | 4 ++-- bolt/include/bolt/Core/DebugData.h | 4 ++-- bolt/lib/Core/BinaryContext.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bolt/include/bolt/Core/BinaryContext.h b/bolt/include/bolt/Core/BinaryContext.h index 3511a04..d286ba4 100644 --- a/bolt/include/bolt/Core/BinaryContext.h +++ b/bolt/include/bolt/Core/BinaryContext.h @@ -284,8 +284,8 @@ public: Expected getDwarfFile(StringRef Directory, StringRef FileName, unsigned FileNumber, Optional Checksum, - Optional Source, unsigned CUID, - unsigned DWARFVersion); + std::optional Source, + unsigned CUID, unsigned DWARFVersion); /// [start memory address] -> [segment info] mapping. std::map SegmentMapInfo; diff --git a/bolt/include/bolt/Core/DebugData.h b/bolt/include/bolt/Core/DebugData.h index 3aaed16..5485016 100644 --- a/bolt/include/bolt/Core/DebugData.h +++ b/bolt/include/bolt/Core/DebugData.h @@ -1134,7 +1134,7 @@ public: Expected tryGetFile(StringRef &Directory, StringRef &FileName, Optional Checksum, - Optional Source, + std::optional Source, uint16_t DwarfVersion, unsigned FileNumber = 0) { assert(RawData.empty() && "cannot use with raw data"); @@ -1151,7 +1151,7 @@ public: /// optional \p Source. void setRootFile(StringRef Directory, StringRef FileName, Optional Checksum, - Optional Source) { + std::optional Source) { Header.setRootFile(Directory, FileName, Checksum, Source); } diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp index 50a545d..280e121 100644 --- a/bolt/lib/Core/BinaryContext.cpp +++ b/bolt/lib/Core/BinaryContext.cpp @@ -1461,7 +1461,7 @@ void BinaryContext::printGlobalSymbols(raw_ostream &OS) const { Expected BinaryContext::getDwarfFile( StringRef Directory, StringRef FileName, unsigned FileNumber, - Optional Checksum, Optional Source, + Optional Checksum, std::optional Source, unsigned CUID, unsigned DWARFVersion) { DwarfLineTable &Table = DwarfLineTablesCUMap[CUID]; return Table.tryGetFile(Directory, FileName, Checksum, Source, DWARFVersion, -- 2.7.4