From b77a88c42e0c35b12eb54fbc459580adfc1531ba Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 27 Nov 2022 11:49:03 -0800 Subject: [PATCH] [Analysis] Use std::optional in IRSimilarityIdentifier.h (NFC) This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716 --- llvm/include/llvm/Analysis/IRSimilarityIdentifier.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h b/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h index a3f1c13..fd14104 100644 --- a/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h +++ b/llvm/include/llvm/Analysis/IRSimilarityIdentifier.h @@ -54,6 +54,7 @@ #include "llvm/IR/PassManager.h" #include "llvm/Pass.h" #include "llvm/Support/Allocator.h" +#include namespace llvm { class Module; @@ -127,7 +128,7 @@ struct IRInstructionData /// This is only relevant if we are wrapping a CmpInst where we needed to /// change the predicate of a compare instruction from a greater than form /// to a less than form. It is None otherwise. - Optional RevisedPredicate; + std::optional RevisedPredicate; /// This is only relevant if we are wrapping a CallInst. If we are requiring /// that the function calls have matching names as well as types, and the @@ -137,7 +138,7 @@ struct IRInstructionData /// function call type. The value held here is used to create the hash of the /// instruction, and check to make sure two instructions are close to one /// another. - Optional CalleeName; + std::optional CalleeName; /// This structure holds the distances of how far "ahead of" or "behind" the /// target blocks of a branch, or the incoming blocks of a phi nodes are. -- 2.7.4