From 89fae41ef142892d8d6c20ead28465a34e12172b Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Mon, 5 Dec 2022 04:13:11 +0000 Subject: [IR] llvm::Optional => std::optional Many llvm/IR/* files have been migrated by other contributors. This migrates most remaining files. --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index b9ee790..b2d56ad 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -670,7 +670,7 @@ getELFSectionNameForGlobal(const GlobalObject *GO, SectionKind Kind, bool HasPrefix = false; if (const auto *F = dyn_cast(GO)) { - if (Optional Prefix = F->getSectionPrefix()) { + if (std::optional Prefix = F->getSectionPrefix()) { raw_svector_ostream(Name) << '.' << *Prefix; HasPrefix = true; } @@ -1720,7 +1720,7 @@ MCSection *TargetLoweringObjectFileCOFF::SelectSectionForGlobal( StringRef COMDATSymName = Sym->getName(); if (const auto *F = dyn_cast(GO)) - if (Optional Prefix = F->getSectionPrefix()) + if (std::optional Prefix = F->getSectionPrefix()) raw_svector_ostream(Name) << '$' << *Prefix; // Append "$symbol" to the section name *before* IR-level mangling is -- cgit v1.1