mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-06 19:06:02 +03:00
Update llvm-profdata-3.9
This commit is contained in:
parent
9233813fd4
commit
3e0338088c
1 changed files with 4 additions and 3 deletions
|
@ -164,9 +164,9 @@ static void mergeSampleProfile(const WeightedFileVector &Inputs,
|
||||||
auto Writer = std::move(WriterOrErr.get());
|
auto Writer = std::move(WriterOrErr.get());
|
||||||
StringMap<FunctionSamples> ProfileMap;
|
StringMap<FunctionSamples> ProfileMap;
|
||||||
SmallVector<std::unique_ptr<sampleprof::SampleProfileReader>, 5> Readers;
|
SmallVector<std::unique_ptr<sampleprof::SampleProfileReader>, 5> Readers;
|
||||||
|
LLVMContext Context;
|
||||||
for (const auto &Input : Inputs) {
|
for (const auto &Input : Inputs) {
|
||||||
auto ReaderOrErr =
|
auto ReaderOrErr = SampleProfileReader::create(Input.Filename, Context);
|
||||||
SampleProfileReader::create(Input.Filename, getGlobalContext());
|
|
||||||
if (std::error_code EC = ReaderOrErr.getError())
|
if (std::error_code EC = ReaderOrErr.getError())
|
||||||
exitWithErrorCode(EC, Input.Filename);
|
exitWithErrorCode(EC, Input.Filename);
|
||||||
|
|
||||||
|
@ -365,7 +365,8 @@ static int showSampleProfile(std::string Filename, bool ShowCounts,
|
||||||
bool ShowAllFunctions, std::string ShowFunction,
|
bool ShowAllFunctions, std::string ShowFunction,
|
||||||
raw_fd_ostream &OS) {
|
raw_fd_ostream &OS) {
|
||||||
using namespace sampleprof;
|
using namespace sampleprof;
|
||||||
auto ReaderOrErr = SampleProfileReader::create(Filename, getGlobalContext());
|
LLVMContext Context;
|
||||||
|
auto ReaderOrErr = SampleProfileReader::create(Filename, Context);
|
||||||
if (std::error_code EC = ReaderOrErr.getError())
|
if (std::error_code EC = ReaderOrErr.getError())
|
||||||
exitWithErrorCode(EC, Filename);
|
exitWithErrorCode(EC, Filename);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue