diff options
author | Fangrui Song <i@maskray.me> | 2022-12-05 04:13:11 +0000 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-12-05 04:13:11 +0000 |
commit | 89fae41ef142892d8d6c20ead28465a34e12172b (patch) | |
tree | 95d80b9764e5d1d25bf8485a8426e6a409930b50 /llvm/lib/IR/ConstantFold.cpp | |
parent | 768cae4a5ab3a564b25ed36c379423f71b42d9d0 (diff) | |
download | llvm-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/IR/ConstantFold.cpp')
-rw-r--r-- | llvm/lib/IR/ConstantFold.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp index 1815bba..a487aa41 100644 --- a/llvm/lib/IR/ConstantFold.cpp +++ b/llvm/lib/IR/ConstantFold.cpp @@ -2022,7 +2022,7 @@ static Constant *foldGEPOfGEP(GEPOperator *GEP, Type *PointeeTy, bool InBounds, // The combined GEP normally inherits its index inrange attribute from // the inner GEP, but if the inner GEP's last index was adjusted by the // outer GEP, any inbounds attribute on that index is invalidated. - Optional<unsigned> IRIndex = GEP->getInRangeIndex(); + std::optional<unsigned> IRIndex = GEP->getInRangeIndex(); if (IRIndex && *IRIndex == GEP->getNumIndices() - 1) IRIndex = std::nullopt; @@ -2033,7 +2033,7 @@ static Constant *foldGEPOfGEP(GEPOperator *GEP, Type *PointeeTy, bool InBounds, Constant *llvm::ConstantFoldGetElementPtr(Type *PointeeTy, Constant *C, bool InBounds, - Optional<unsigned> InRangeIndex, + std::optional<unsigned> InRangeIndex, ArrayRef<Value *> Idxs) { if (Idxs.empty()) return C; |