We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ExitOnErr
1 parent 3143d88 commit 9673ec8Copy full SHA for 9673ec8
clang/lib/Interpreter/RemoteJITUtils.cpp
@@ -29,8 +29,6 @@
29
using namespace llvm;
30
using namespace llvm::orc;
31
32
-static ExitOnError ExitOnErr;
33
-
34
Expected<uint64_t> getSlabAllocSize(StringRef SizeString) {
35
SizeString = SizeString.trim();
36
@@ -76,8 +74,12 @@ createSharedMemoryManager(SimpleRemoteEPC &SREPC,
76
74
size_t SlabSize = 1024 * 1024 * 1024;
77
75
#endif
78
79
- if (!SlabAllocateSizeString.empty())
80
- SlabSize = ExitOnErr(getSlabAllocSize(SlabAllocateSizeString));
+ if (!SlabAllocateSizeString.empty()) {
+ if (auto S = getSlabAllocSize(SlabAllocateSizeString))
+ SlabSize = *S;
+ else
81
+ return S.takeError();
82
+ }
83
84
return MapperJITLinkMemoryManager::CreateWithMapper<SharedMemoryMapper>(
85
SlabSize, SREPC, SAs);
0 commit comments