Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  - switched deprecated makeArrayRef to ArrayRef
  - switched deprecated countTrailingZeros to countr_zero

Change-Id: Ic66ef2a4e4dd7a9b4e1e720adb45a4b8c3b190c3
  • Loading branch information
lamb-j authored and Mystro256 committed Apr 18, 2023
1 parent 96d5b6f commit 278f851
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/comgr/src/comgr-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static amd_comgr_status_t linkWithLLD(llvm::ArrayRef<const char *> Args,
LLDArgs.insert(LLDArgs.begin(), "lld");
LLDArgs.push_back("--threads=1");

ArrayRef<const char *> ArgRefs = llvm::makeArrayRef(LLDArgs);
ArrayRef<const char *> ArgRefs = llvm::ArrayRef(LLDArgs);
bool LLDRet = lld::elf::link(ArgRefs, LogS, LogE, false, false);
lld::CommonLinkerContext::destroy();
if (!LLDRet) {
Expand Down
2 changes: 1 addition & 1 deletion lib/comgr/src/comgr-elfdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void printProgramHeaders(const ELFFile<ELFT> &ELF, raw_ostream &OS) {
OS << "off " << format(Fmt, (uint64_t)Phdr.p_offset) << "vaddr "
<< format(Fmt, (uint64_t)Phdr.p_vaddr) << "paddr "
<< format(Fmt, (uint64_t)Phdr.p_paddr)
<< format("align 2**%u\n", countTrailingZeros<uint64_t>(Phdr.p_align))
<< format("align 2**%u\n", countr_zero<uint64_t>(Phdr.p_align))
<< " filesz " << format(Fmt, (uint64_t)Phdr.p_filesz) << "memsz "
<< format(Fmt, (uint64_t)Phdr.p_memsz) << "flags "
<< ((Phdr.p_flags & ELF::PF_R) ? "r" : "-")
Expand Down
2 changes: 1 addition & 1 deletion lib/comgr/src/comgr-objdump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ class AMDGCNPrettyPrinter : public PrettyPrinter {
OS << left_justify(IS.str(), 60)
<< format("// %012" PRIX64 ": ", Address.Address);
typedef support::ulittle32_t U32;
for (auto D : makeArrayRef(reinterpret_cast<const U32 *>(Bytes.data()),
for (auto D : ArrayRef(reinterpret_cast<const U32 *>(Bytes.data()),
Bytes.size() / sizeof(U32))) {
// D should be explicitly casted to uint32_t here as it is passed
// by format to snprintf as vararg.
Expand Down

0 comments on commit 278f851

Please sign in to comment.