Different fix for gcc bug

Was still running into

from definition of 'template<class T> struct llvm::DenseMapInfo'
[-fpermissive]
 template <typename T> struct DenseMapInfo;
                               ^
This commit is contained in:
Jacques Pienaar 2021-02-19 16:41:00 -08:00
parent c68d2895a1
commit 3bec7ed59e
1 changed files with 3 additions and 1 deletions

View File

@ -82,8 +82,9 @@ using namespace llvm::XCOFF;
// std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind> in DenseMap.
// This specialization is needed here because that type is used as keys in the
// map representing TOC entries.
namespace llvm {
template <>
struct llvm::DenseMapInfo<std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>> {
struct DenseMapInfo<std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>> {
using TOCKey = std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>;
static inline TOCKey getEmptyKey() {
@ -99,6 +100,7 @@ struct llvm::DenseMapInfo<std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKi
}
static bool isEqual(const TOCKey &A, const TOCKey &B) { return A == B; }
};
} // end namespace llvm
namespace {