[llvm-branch-commits] [lld] 4d99370 - Fix gcc build error after D105519

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 11 21:38:51 PDT 2021


Author: Pan, Tao
Date: 2021-08-11T21:38:23-07:00
New Revision: 4d9937065a29dac963d1119524a22294c1473d82

URL: https://github.com/llvm/llvm-project/commit/4d9937065a29dac963d1119524a22294c1473d82
DIFF: https://github.com/llvm/llvm-project/commit/4d9937065a29dac963d1119524a22294c1473d82.diff

LOG: Fix gcc build error after D105519

Same as 3bec7ed59e1b

Reviewed By: sbc100

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

(cherry picked from commit c70fa6da9a0c6523f796f84ef6e020809ea9b65e)

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-branch-commits mailing list