Skip to content

Commit cd774c8

Browse files
committed
[BOLT][NFC] Rename ProfilePseudoProbeDesc
Address build issues due to aliasing PseudoProbeDesc, e.g. https://lab.llvm.org/buildbot/#/builders/113/builds/2743
1 parent d9ed8b0 commit cd774c8

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

bolt/include/bolt/Profile/ProfileYAMLMapping.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -270,12 +270,12 @@ template <> struct MappingTraits<bolt::BinaryProfileHeader> {
270270
};
271271

272272
namespace bolt {
273-
struct PseudoProbeDesc {
273+
struct ProfilePseudoProbeDesc {
274274
std::vector<Hex64> GUID;
275275
std::vector<Hex64> Hash;
276276
std::vector<uint32_t> GUIDHashIdx; // Index of hash for that GUID in Hash
277277

278-
bool operator==(const PseudoProbeDesc &Other) const {
278+
bool operator==(const ProfilePseudoProbeDesc &Other) const {
279279
// Only treat empty Desc as equal
280280
return GUID.empty() && Other.GUID.empty() && Hash.empty() &&
281281
Other.Hash.empty() && GUIDHashIdx.empty() &&
@@ -284,8 +284,8 @@ struct PseudoProbeDesc {
284284
};
285285
} // end namespace bolt
286286

287-
template <> struct MappingTraits<bolt::PseudoProbeDesc> {
288-
static void mapping(IO &YamlIO, bolt::PseudoProbeDesc &PD) {
287+
template <> struct MappingTraits<bolt::ProfilePseudoProbeDesc> {
288+
static void mapping(IO &YamlIO, bolt::ProfilePseudoProbeDesc &PD) {
289289
YamlIO.mapRequired("gs", PD.GUID);
290290
YamlIO.mapRequired("gh", PD.GUIDHashIdx);
291291
YamlIO.mapRequired("hs", PD.Hash);
@@ -295,7 +295,7 @@ template <> struct MappingTraits<bolt::PseudoProbeDesc> {
295295
} // end namespace llvm
296296

297297
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::BinaryFunctionProfile)
298-
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::PseudoProbeDesc)
298+
LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::bolt::ProfilePseudoProbeDesc)
299299

300300
namespace llvm {
301301
namespace yaml {
@@ -304,7 +304,7 @@ namespace bolt {
304304
struct BinaryProfile {
305305
BinaryProfileHeader Header;
306306
std::vector<BinaryFunctionProfile> Functions;
307-
PseudoProbeDesc PseudoProbeDesc;
307+
ProfilePseudoProbeDesc PseudoProbeDesc;
308308
};
309309
} // namespace bolt
310310

@@ -313,7 +313,7 @@ template <> struct MappingTraits<bolt::BinaryProfile> {
313313
YamlIO.mapRequired("header", BP.Header);
314314
YamlIO.mapRequired("functions", BP.Functions);
315315
YamlIO.mapOptional("pseudo_probe_desc", BP.PseudoProbeDesc,
316-
bolt::PseudoProbeDesc());
316+
bolt::ProfilePseudoProbeDesc());
317317
}
318318
};
319319

bolt/include/bolt/Profile/YAMLProfileWriter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class YAMLProfileWriter {
4747
convertBFInlineTree(const MCPseudoProbeDecoder &Decoder,
4848
const InlineTreeDesc &InlineTree, uint64_t GUID);
4949

50-
static std::tuple<yaml::bolt::PseudoProbeDesc, InlineTreeDesc>
50+
static std::tuple<yaml::bolt::ProfilePseudoProbeDesc, InlineTreeDesc>
5151
convertPseudoProbeDesc(const MCPseudoProbeDecoder &PseudoProbeDecoder);
5252

5353
static yaml::bolt::BinaryFunctionProfile

bolt/lib/Profile/YAMLProfileWriter.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,10 @@ YAMLProfileWriter::collectInlineTree(
8181
return InlineTree;
8282
}
8383

84-
std::tuple<yaml::bolt::PseudoProbeDesc, YAMLProfileWriter::InlineTreeDesc>
84+
std::tuple<yaml::bolt::ProfilePseudoProbeDesc,
85+
YAMLProfileWriter::InlineTreeDesc>
8586
YAMLProfileWriter::convertPseudoProbeDesc(const MCPseudoProbeDecoder &Decoder) {
86-
yaml::bolt::PseudoProbeDesc Desc;
87+
yaml::bolt::ProfilePseudoProbeDesc Desc;
8788
InlineTreeDesc InlineTree;
8889

8990
for (const MCDecodedPseudoProbeInlineTree &TopLev :

0 commit comments

Comments
 (0)