diff options
author | Marcelo Juchem <juchem@gmail.com> | 2021-10-01 08:42:23 +0100 |
---|---|---|
committer | James Henderson <james.henderson@sony.com> | 2021-10-01 14:19:57 +0100 |
commit | dfb213c2dfdc813efdaf399af5867288573de186 (patch) | |
tree | 97b0ddc47f5c3eb8f3838d7b584a93fd61fffbe5 /llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp | |
parent | 067312d28393e93ca15340b93278d3ba61fabd62 (diff) | |
download | llvm-dfb213c2dfdc813efdaf399af5867288573de186.zip llvm-dfb213c2dfdc813efdaf399af5867288573de186.tar.gz llvm-dfb213c2dfdc813efdaf399af5867288573de186.tar.bz2 |
Fix ambiguous overload build failure
LLVM (llvmorg-14-init) under Debian sid using latest gcc (Debian
10.3.0-9) 10.3.0 fails due to ambiguous overload on operators == and !=:
/root/src/llvm/src/llvm/tools/obj2yaml/elf2yaml.cpp:212:22:
error: ambiguous overload for 'operator!='
(operand types are 'llvm::ELFYAML::ELF_SHF' and 'int')
/root/src/llvm/src/llvm/tools/obj2yaml/elf2yaml.cpp:204:32:
error: ambiguous overload for 'operator!='
(operand types are 'const llvm::yaml::Hex64' and 'int')
/root/src/llvm/src/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp:629:35:
error: ambiguous overload for 'operator=='
(operand types are 'const uint64_t' {aka 'const long unsigned int'} and
'llvm::Register')
Reviewed by: StephenTozer, jmorse, Higuoxing
Differential Revision: https://reviews.llvm.org/D109534
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp index 899163c..a026e57 100644 --- a/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp +++ b/llvm/lib/CodeGen/LiveDebugValues/VarLocBasedImpl.cpp @@ -618,7 +618,7 @@ private: unsigned getRegIdx(Register Reg) const { for (unsigned Idx = 0; Idx < Locs.size(); ++Idx) if (Locs[Idx].Kind == MachineLocKind::RegisterKind && - Locs[Idx].Value.RegNo == Reg) + Register{static_cast<unsigned>(Locs[Idx].Value.RegNo)} == Reg) return Idx; llvm_unreachable("Could not find given Reg in Locs"); } |