[BOLT] Fix broken unittests
authorAmir Ayupov <aaupov@fb.com>
Mon, 12 Dec 2022 06:34:40 +0000 (22:34 -0800)
committerAmir Ayupov <aaupov@fb.com>
Mon, 12 Dec 2022 06:34:40 +0000 (22:34 -0800)
bolt/unittests/Core/BinaryContext.cpp
bolt/unittests/Profile/DataAggregator.cpp

index 3620163..bac2641 100644 (file)
@@ -75,7 +75,7 @@ TEST_P(BinaryContextTester, BaseAddress) {
   BC->SegmentMapInfo[0x4b84d5e8] =
       SegmentInfo{0x4b84d5e8, 0x294f830, 0x4b84a5e8, 0x3d3820, 0x1000};
 
-  Optional<uint64_t> BaseAddress =
+  std::optional<uint64_t> BaseAddress =
       BC->getBaseAddressForMapping(0x7f13f5556000, 0x10e8c000);
   ASSERT_TRUE(BaseAddress.has_value());
   ASSERT_EQ(*BaseAddress, 0x7f13e46c9000ULL);
index 8d13fbd..a27dd82 100644 (file)
@@ -22,7 +22,7 @@ TEST(DataAggregatorTest, buildID) {
   opts::ReadPreAggregated = true;
 
   DataAggregator DA("<pseudo input>");
-  Optional<StringRef> FileName;
+  std::optional<StringRef> FileName;
 
   DA.setParsingBuffer("");
   ASSERT_FALSE(DA.hasAllBuildIDs());