This is an archive of the discontinued LLVM Phabricator instance.

[InstrProf] Fix build error in Correlator class
ClosedPublic

Authored by ellis on Dec 16 2021, 3:54 PM.

Details

Summary

For some reason this did not fail to compile for me locally, but did
fail on one of the builders. Here is the error:

https://lab.llvm.org/buildbot/#/builders/58/builds/14969

/home/buildbot/as-builder-4/lld-x86_64-ubuntu-fast/llvm-project/llvm/lib/ProfileData/InstrProfCorrelator.cpp: In static member function ‘static llvm::Expected<std::unique_ptr<llvm::InstrProfCorrelator::Context> > llvm::InstrProfCorrelator::Context::get(std::unique_ptr<llvm::MemoryBuffer>, const llvm::object::ObjectFile&)’:
/home/buildbot/as-builder-4/lld-x86_64-ubuntu-fast/llvm-project/llvm/lib/ProfileData/InstrProfCorrelator.cpp:44:10: error: could not convert ‘C’ from ‘std::unique_ptr<llvm::InstrProfCorrelator::Context>’ to ‘llvm::Expected<std::unique_ptr<llvm::InstrProfCorrelator::Context> >’
   return C;

Diff Detail

Event Timeline

ellis created this revision.Dec 16 2021, 3:54 PM
ellis requested review of this revision.Dec 16 2021, 3:54 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2021, 3:54 PM
kyulee accepted this revision.Dec 16 2021, 3:55 PM
This revision is now accepted and ready to land.Dec 16 2021, 3:55 PM
This revision was landed with ongoing or failed builds.Dec 16 2021, 3:59 PM
This revision was automatically updated to reflect the committed changes.