aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-12-05 04:13:11 +0000
committerFangrui Song <i@maskray.me>2022-12-05 04:13:11 +0000
commit89fae41ef142892d8d6c20ead28465a34e12172b (patch)
tree95d80b9764e5d1d25bf8485a8426e6a409930b50 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent768cae4a5ab3a564b25ed36c379423f71b42d9d0 (diff)
downloadllvm-89fae41ef142892d8d6c20ead28465a34e12172b.zip
llvm-89fae41ef142892d8d6c20ead28465a34e12172b.tar.gz
llvm-89fae41ef142892d8d6c20ead28465a34e12172b.tar.bz2
[IR] llvm::Optional => std::optional
Many llvm/IR/* files have been migrated by other contributors. This migrates most remaining files.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp4
1 files changed, 2 insertions, 2 deletions
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<Function>(GO)) {
- if (Optional<StringRef> Prefix = F->getSectionPrefix()) {
+ if (std::optional<StringRef> 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<Function>(GO))
- if (Optional<StringRef> Prefix = F->getSectionPrefix())
+ if (std::optional<StringRef> Prefix = F->getSectionPrefix())
raw_svector_ostream(Name) << '$' << *Prefix;
// Append "$symbol" to the section name *before* IR-level mangling is