[lld] c70fa6d - Fix gcc build error after D105519
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 8 23:32:48 PDT 2021
Author: Pan, Tao
Date: 2021-08-09T14:32:34+08:00
New Revision: c70fa6da9a0c6523f796f84ef6e020809ea9b65e
URL: https://github.com/llvm/llvm-project/commit/c70fa6da9a0c6523f796f84ef6e020809ea9b65e
DIFF: https://github.com/llvm/llvm-project/commit/c70fa6da9a0c6523f796f84ef6e020809ea9b65e.diff
LOG: Fix gcc build error after D105519
Same as 3bec7ed59e1b
Reviewed By: sbc100
Differential Revision: https://reviews.llvm.org/D107422
Added:
Modified:
lld/wasm/SyntheticSections.h
Removed:
################################################################################
diff --git a/lld/wasm/SyntheticSections.h b/lld/wasm/SyntheticSections.h
index 8eebe916780c6..12517b65c1635 100644
--- a/lld/wasm/SyntheticSections.h
+++ b/lld/wasm/SyntheticSections.h
@@ -131,7 +131,8 @@ inline bool operator==(const ImportKey<T> &lhs, const ImportKey<T> &rhs) {
// `ImportKey<T>` can be used as a key in a `DenseMap` if `T` can be used as a
// key in a `DenseMap`.
-template <typename T> struct llvm::DenseMapInfo<lld::wasm::ImportKey<T>> {
+namespace llvm {
+template <typename T> struct DenseMapInfo<lld::wasm::ImportKey<T>> {
static lld::wasm::ImportKey<T> getEmptyKey() {
typename lld::wasm::ImportKey<T> key(llvm::DenseMapInfo<T>::getEmptyKey());
key.state = lld::wasm::ImportKey<T>::State::Empty;
@@ -154,6 +155,7 @@ template <typename T> struct llvm::DenseMapInfo<lld::wasm::ImportKey<T>> {
return lhs == rhs;
}
};
+} // end namespace llvm
namespace lld {
namespace wasm {
More information about the llvm-commits
mailing list