Skip to content

Commit

Permalink
Fix gcc build error after D105519
Browse files Browse the repository at this point in the history
Same as 3bec7ed

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D107422

(cherry picked from commit c70fa6d)
  • Loading branch information
PanTao2 authored and tstellar committed Aug 12, 2021
1 parent e4471e7 commit 4d99370
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lld/wasm/SyntheticSections.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -154,6 +155,7 @@ template <typename T> struct llvm::DenseMapInfo<lld::wasm::ImportKey<T>> {
return lhs == rhs;
}
};
} // end namespace llvm

namespace lld {
namespace wasm {
Expand Down

0 comments on commit 4d99370

Please sign in to comment.