You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix potential constructor ambiguity in BuiltinCallMutator::ValueTypePair (#3268)
BuiltinCallMutator::ValueTypePair defines its own constructor with
arguments (llvm::Value *V, llvm::Type *T)
BuiltinCallMutator::ValueTypePair also uses std::pair constructor with
arguments (llvm::Value *&V, llvm::Type *&T)
This causes an ambiguity that confuses GCC when compiling for C++20.
Issue repro on goldbolt: https://godbolt.org/z/MTnvx6E6T
There are multiple possible fixes. I think the one with the least impact
is to change BuiltinCallMutator::ValueTypePair constructor signature to
conform with std::pair constructor signature.
Fixed version: https://godbolt.org/z/49WzvjK63
Other possibility is to remove the constructors that are redundant. But
maybe they are very important.
Original commit:
KhronosGroup/SPIRV-LLVM-Translator@9413a66e04ba34f
0 commit comments