HomePhabricator

[SamplePGO][NFC] Minor improvement to replace a temporary vector with a

Description

[SamplePGO][NFC] Minor improvement to replace a temporary vector with a
brace-enclosed init list.

Differential Revision: https://reviews.llvm.org/D57726

Event Timeline

That triggers a warning:

llvm/lib/Transforms/IPO/SampleProfile.cpp:1331:50: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'unsigned int' in initializer list [-Wc++11-narrowing]
                        MDB.createBranchWeights({BlockWeights[BB]}));
                                                 ^~~~~~~~~~~~~~~~

Will revert to keep build bots happy.