From 54ea422d9f7ac59a6dbddbd01dc3ca8b925419da Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 26 Nov 2022 15:24:34 -0800 Subject: [PATCH] [Orc] Use std::optional in ObjectFileInterface.cpp (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/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp b/llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp index 5970300..f3f0b7d 100644 --- a/llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp +++ b/llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp @@ -15,6 +15,7 @@ #include "llvm/Object/MachO.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Support/Debug.h" +#include #define DEBUG_TYPE "orc" @@ -151,7 +152,7 @@ static Expected getCOFFObjectFileSymbolInfo(ExecutionSession &ES, const object::COFFObjectFile &Obj) { MaterializationUnit::Interface I; - std::vector> ComdatDefs( + std::vector> ComdatDefs( Obj.getNumberOfSections() + 1); for (auto &Sym : Obj.symbols()) { Expected SymFlagsOrErr = Sym.getFlags(); -- 2.7.4