From 467432899bc2f71842ed1b24d24c094da02af7d4 Mon Sep 17 00:00:00 2001 From: Krzysztof Parzyszek Date: Thu, 1 Dec 2022 15:23:53 -0800 Subject: MemoryLocation: convert Optional to std::optional --- llvm/lib/CodeGen/StackProtector.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/StackProtector.cpp') diff --git a/llvm/lib/CodeGen/StackProtector.cpp b/llvm/lib/CodeGen/StackProtector.cpp index 2eef88b..2f0056f 100644 --- a/llvm/lib/CodeGen/StackProtector.cpp +++ b/llvm/lib/CodeGen/StackProtector.cpp @@ -46,6 +46,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetOptions.h" +#include #include using namespace llvm; @@ -166,7 +167,7 @@ bool StackProtector::HasAddressTaken(const Instruction *AI, const auto *I = cast(U); // If this instruction accesses memory make sure it doesn't access beyond // the bounds of the allocated object. - Optional MemLoc = MemoryLocation::getOrNone(I); + std::optional MemLoc = MemoryLocation::getOrNone(I); if (MemLoc && MemLoc->Size.hasValue() && !TypeSize::isKnownGE(AllocSize, TypeSize::getFixed(MemLoc->Size.getValue()))) -- cgit v1.1