summaryrefslogtreecommitdiff
path: root/bolt/include
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2022-12-11 12:02:21 -0800
committerAmir Ayupov <aaupov@fb.com>2022-12-11 22:13:46 -0800
commite8f5743e86c7386b2f91c614b16a2588b390024e (patch)
tree17db61512c1e569ac15e8a298e4e76f19fff91f5 /bolt/include
parent835a9c2801a62c2b7b35d7c2985eec32f518dbf5 (diff)
downloadllvm-e8f5743e86c7386b2f91c614b16a2588b390024e.tar.gz
[BOLT][NFC] Use std::optional in BC
Diffstat (limited to 'bolt/include')
-rw-r--r--bolt/include/bolt/Core/BinaryContext.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/bolt/include/bolt/Core/BinaryContext.h b/bolt/include/bolt/Core/BinaryContext.h
index 277d266c99cd..2d60ac56b5a1 100644
--- a/bolt/include/bolt/Core/BinaryContext.h
+++ b/bolt/include/bolt/Core/BinaryContext.h
@@ -152,7 +152,7 @@ class BinaryContext {
std::string Filename;
/// Unique build ID if available for the binary.
- Optional<std::string> FileBuildID;
+ std::optional<std::string> FileBuildID;
/// Set of all sections.
struct CompareSections {
@@ -259,7 +259,7 @@ public:
void clearFragmentsToSkip() { FragmentsToSkip.clear(); }
/// Given DWOId returns CU if it exists in DWOCUs.
- Optional<DWARFUnit *> getDWOCU(uint64_t DWOId);
+ std::optional<DWARFUnit *> getDWOCU(uint64_t DWOId);
/// Returns DWOContext if it exists.
DWARFContext *getDWOContext() const;
@@ -319,7 +319,7 @@ public:
StringRef getFilename() const { return Filename; }
void setFilename(StringRef Name) { Filename = std::string(Name); }
- Optional<StringRef> getFileBuildID() const {
+ std::optional<StringRef> getFileBuildID() const {
if (FileBuildID)
return StringRef(*FileBuildID);
@@ -1064,8 +1064,8 @@ public:
/// mapping. Note that \p FileOffset should be page-aligned and could be
/// different from the file offset of the segment which could be unaligned.
/// If no segment is found that matches \p FileOffset, return std::nullopt.
- Optional<uint64_t> getBaseAddressForMapping(uint64_t MMapAddress,
- uint64_t FileOffset) const;
+ std::optional<uint64_t> getBaseAddressForMapping(uint64_t MMapAddress,
+ uint64_t FileOffset) const;
/// Check if the address belongs to this binary's static allocation space.
bool containsAddress(uint64_t Address) const {