From cf720b662f36b6fbe4ea438a3021ecb396975a25 Mon Sep 17 00:00:00 2001 From: Scott Todd Date: Thu, 25 Jul 2024 11:05:16 -0700 Subject: [PATCH] [lld][InstrProf] Add explicit conversion for enum to Twine. --- lld/MachO/BPSectionOrderer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lld/MachO/BPSectionOrderer.cpp b/lld/MachO/BPSectionOrderer.cpp index 26d4e0cb3987d..f6a974370836b 100644 --- a/lld/MachO/BPSectionOrderer.cpp +++ b/lld/MachO/BPSectionOrderer.cpp @@ -48,9 +48,9 @@ getRelocHash(const Reloc &reloc, sectionIdx = sectionIdxIt->getSecond(); std::string kind; if (isec) - kind = ("Section " + Twine(isec->kind())).str(); + kind = ("Section " + Twine((uint8_t)isec->kind())).str(); if (auto *sym = reloc.referent.dyn_cast()) { - kind += (" Symbol " + Twine(sym->kind())).str(); + kind += (" Symbol " + Twine((uint8_t)sym->kind())).str(); if (auto *d = dyn_cast(sym)) { if (isa_and_nonnull(isec)) return getRelocHash(kind, 0, isec->getOffset(d->value), reloc.addend);