[InstrProf] Fix build error in Correlator class
authorEllis Hoag <ellis.sparky.hoag@gmail.com>
Thu, 16 Dec 2021 23:58:51 +0000 (15:58 -0800)
committerEllis Hoag <ellis.sparky.hoag@gmail.com>
Thu, 16 Dec 2021 23:59:12 +0000 (15:59 -0800)
commit01525da853c657f72e275395c20e31bd8a8151aa
treecc46495153bc1158880ebda0fc4df57f8dcf890d
parent85f799730f2edfe9dc3e391732d65545039dd5b9
[InstrProf] Fix build error in Correlator class

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;
```

Reviewed By: kyulee

Differential Revision: https://reviews.llvm.org/D115911
llvm/lib/ProfileData/InstrProfCorrelator.cpp