Skip to content

Commit 6032ff6

Browse files
[CAS] Fix a bug in CAS storeFromOpenFileImpl (#153315)
Fix a bug in upstreamed CAS implemenation due to copy/paste error. The missing coverage will be covered by future upstreamed tests.
1 parent 7317e3c commit 6032ff6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/CAS/ObjectStore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ObjectStore::storeFromOpenFileImpl(sys::fs::file_t FD,
125125
// standalone file if the file-system supports it and the file is large.
126126
uint64_t Size = Status ? Status->getSize() : -1;
127127
auto Buffer = MemoryBuffer::getOpenFile(FD, /*Filename=*/"", Size);
128-
if (Buffer)
128+
if (!Buffer)
129129
return errorCodeToError(Buffer.getError());
130130

131131
return store({}, arrayRefFromStringRef<char>((*Buffer)->getBuffer()));

0 commit comments

Comments
 (0)