Skip to content

Commit 3bec7ed

Browse files
committed
Different fix for gcc bug
Was still running into from definition of 'template<class T> struct llvm::DenseMapInfo' [-fpermissive] template <typename T> struct DenseMapInfo; ^
1 parent c68d289 commit 3bec7ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ using namespace llvm::XCOFF;
8282
// std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind> in DenseMap.
8383
// This specialization is needed here because that type is used as keys in the
8484
// map representing TOC entries.
85+
namespace llvm {
8586
template <>
86-
struct llvm::DenseMapInfo<std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>> {
87+
struct DenseMapInfo<std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>> {
8788
using TOCKey = std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKind>;
8889

8990
static inline TOCKey getEmptyKey() {
@@ -99,6 +100,7 @@ struct llvm::DenseMapInfo<std::pair<const MCSymbol *, MCSymbolRefExpr::VariantKi
99100
}
100101
static bool isEqual(const TOCKey &A, const TOCKey &B) { return A == B; }
101102
};
103+
} // end namespace llvm
102104

103105
namespace {
104106

0 commit comments

Comments
 (0)