Skip to content

Commit

Permalink
[clang/CompileJobCache] Fix UBSan issue
Browse files Browse the repository at this point in the history
(cherry picked from commit f7cd52a)
  • Loading branch information
akyrtzi committed Aug 25, 2023
1 parent 1c7f71c commit eacdc31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clang/lib/Frontend/CompileJobCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ class ObjectStoreCachingOutputs : public CompileJobCache::CachingOutputs {
UseCASBackend),
ComputedJobNeedsReplay(WriteOutputAsCASID || UseCASBackend),
MCOutputID(MCOutputID), CAS(std::move(DB)), Cache(std::move(Cache)) {
CASOutputs = llvm::makeIntrusiveRefCnt<llvm::cas::CASOutputBackend>(*CAS);
if (CAS)
CASOutputs = llvm::makeIntrusiveRefCnt<llvm::cas::CASOutputBackend>(*CAS);
}

Expected<std::optional<int>>
Expand Down

0 comments on commit eacdc31

Please sign in to comment.