[llvm] a747e35 - [Orc] Fix MSVC error: conversion from 'initializer list' requires a narrowing
Stefan Gränitz via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 2 06:35:12 PST 2021
Author: Stefan Gränitz
Date: 2021-03-02T15:34:36+01:00
New Revision: a747e35c3ec371fce1f36424986b6b40ee2f25a9
URL: https://github.com/llvm/llvm-project/commit/a747e35c3ec371fce1f36424986b6b40ee2f25a9
DIFF: https://github.com/llvm/llvm-project/commit/a747e35c3ec371fce1f36424986b6b40ee2f25a9.diff
LOG: [Orc] Fix MSVC error: conversion from 'initializer list' requires a narrowing
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
index dc1778d4534c..62954aa57ea2 100644
--- a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
@@ -292,7 +292,11 @@ ELFDebugObject::finalizeWorkingMemory(JITLinkContext &Ctx) {
size_t Size = Buffer->getBufferSize();
// Allocate working memory for debug object in read-only segment.
- auto AllocOrErr = MemMgr.allocate(JD, {{ReadOnly, {Alignment, Size, 0}}});
+ JITLinkMemoryManager::SegmentsRequestMap SingleReadOnlySegment;
+ SingleReadOnlySegment[ReadOnly] =
+ JITLinkMemoryManager::SegmentRequest(Alignment, Size, 0);
+
+ auto AllocOrErr = MemMgr.allocate(JD, SingleReadOnlySegment);
if (!AllocOrErr)
return AllocOrErr.takeError();
More information about the llvm-commits
mailing list