[llvm] 3bec7ed - Different fix for gcc bug
Jacques Pienaar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 19 16:41:14 PST 2021
Author: Jacques Pienaar
Date: 2021-02-19T16:41:00-08:00
New Revision: 3bec7ed59e1b16eb07f5adac7e12dc6cb7fe0be2
URL: https://github.com/llvm/llvm-project/commit/3bec7ed59e1b16eb07f5adac7e12dc6cb7fe0be2
DIFF: https://github.com/llvm/llvm-project/commit/3bec7ed59e1b16eb07f5adac7e12dc6cb7fe0be2.diff
LOG: Different fix for gcc bug
Was still running into
from definition of 'template<class T> struct llvm::DenseMapInfo'
[-fpermissive]
template <typename T> struct DenseMapInfo;
^
Added:
Modified:
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
index 711c72ba5b39..9b791a1618e9 100644
--- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -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 {
More information about the llvm-commits
mailing list