diff options
| author | Clifford Wolf <clifford@clifford.at> | 2014-12-29 02:46:59 +0100 | 
|---|---|---|
| committer | Clifford Wolf <clifford@clifford.at> | 2014-12-29 02:46:59 +0100 | 
| commit | 397ae5b697e9923bb9d35df425370efd9357b127 (patch) | |
| tree | d7e1f971fe1615bc0b0917be3a75004074aa6d17 | |
| parent | cfe0817697c9e7a656fd3a64e3a9014fa86e78d0 (diff) | |
| download | yosys-397ae5b697e9923bb9d35df425370efd9357b127.tar.gz yosys-397ae5b697e9923bb9d35df425370efd9357b127.tar.bz2 yosys-397ae5b697e9923bb9d35df425370efd9357b127.zip  | |
gcc build fixes
| -rw-r--r-- | kernel/yosys.h | 27 | 
1 files changed, 16 insertions, 11 deletions
diff --git a/kernel/yosys.h b/kernel/yosys.h index 8ddd6f540..700a0603d 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -48,6 +48,7 @@  #include <unordered_map>  #include <unordered_set>  #include <initializer_list> +#include <stdexcept>  #include <sstream>  #include <fstream> @@ -124,6 +125,8 @@  YOSYS_NAMESPACE_BEGIN +// Note: All headers included in hashlib.h must be included +// outside of YOSYS_NAMESPACE before this or bad things will happen.  #ifdef HASHLIB_H  #  undef HASHLIB_H  #  include "kernel/hashlib.h" @@ -165,17 +168,19 @@ using RTLIL::Cell;  using RTLIL::Module;  using RTLIL::Design; -template<> struct hash_ops<RTLIL::Wire*> : hash_obj_ops {}; -template<> struct hash_ops<RTLIL::Cell*> : hash_obj_ops {}; -template<> struct hash_ops<RTLIL::Module*> : hash_obj_ops {}; -template<> struct hash_ops<RTLIL::Design*> : hash_obj_ops {}; -template<> struct hash_ops<RTLIL::Monitor*> : hash_obj_ops {}; - -template<> struct hash_ops<const RTLIL::Wire*> : hash_obj_ops {}; -template<> struct hash_ops<const RTLIL::Cell*> : hash_obj_ops {}; -template<> struct hash_ops<const RTLIL::Module*> : hash_obj_ops {}; -template<> struct hash_ops<const RTLIL::Design*> : hash_obj_ops {}; -template<> struct hash_ops<const RTLIL::Monitor*> : hash_obj_ops {}; +namespace hashlib { +	template<> struct hash_ops<RTLIL::Wire*> : hash_obj_ops {}; +	template<> struct hash_ops<RTLIL::Cell*> : hash_obj_ops {}; +	template<> struct hash_ops<RTLIL::Module*> : hash_obj_ops {}; +	template<> struct hash_ops<RTLIL::Design*> : hash_obj_ops {}; +	template<> struct hash_ops<RTLIL::Monitor*> : hash_obj_ops {}; + +	template<> struct hash_ops<const RTLIL::Wire*> : hash_obj_ops {}; +	template<> struct hash_ops<const RTLIL::Cell*> : hash_obj_ops {}; +	template<> struct hash_ops<const RTLIL::Module*> : hash_obj_ops {}; +	template<> struct hash_ops<const RTLIL::Design*> : hash_obj_ops {}; +	template<> struct hash_ops<const RTLIL::Monitor*> : hash_obj_ops {}; +}  void memhasher_on();  void memhasher_off();  | 
