[LLVMdev] hash extras
Ryan M. Lefever
lefever at crhc.illinois.edu
Mon Oct 12 18:40:55 PDT 2009
So, after digging around in the old llvm/ADT/hash_map, I think I
discovered the problem. Now, if you want to include
llvm/ADT/HashExtras.h, you have to include the hash_map h file from your
system (ext/hash_map in my case) and define HASH_NAMESPACE, before you
include llvm/ADT/HashExtras. It might be good to include some
documentation about that for those using HashExtras.
Regards,
Ryan
Ryan M. Lefever wrote:
> I am trying to upgrade my code to use the latest version of llvm from
> svn. Whenever I include "llvm/ADT/HashExtras.h", I get error messages
> like the following. Does anyone know what is going on? Thanks for any
> help.
>
> llvm[1]: Compiling Aux.cpp for Debug build (PIC)
> In file included from
> /home/lefever/work/memrep/src/compiler/include/Aux.h:4,
> from Aux.cpp:1:
> /home/lefever/llvm/svn091010/llvm/include/llvm/ADT/HashExtras.h:26:
> error: ‘hash’ is not a template
> /home/lefever/llvm/svn091010/llvm/include/llvm/ADT/HashExtras.h: In
> member function ‘size_t HASH_NAMESPACE::hash<std::basic_string<char,
> std::char_traits<char>, std::allocator<char> > >::operator()(const
> std::string&) const’:
> /home/lefever/llvm/svn091010/llvm/include/llvm/ADT/HashExtras.h:34:
> error: no match for call to ‘(HASH_NAMESPACE::hash<const char*>) (const
> char*)’
> /home/lefever/llvm/svn091010/llvm/include/llvm/ADT/HashExtras.h:27:
> note: candidates are: size_t HASH_NAMESPACE::hash<T>::operator()(const
> T*) const [with T = const char*]
> make[1]: ***
> [/home/lefever/work/memrep/src/compiler/lib/memrep/Debug/Aux.o] Error 1
> make[1]: Leaving directory
> `/home/lefever/work/memrep/src/compiler/lib/memrep'
> make: *** [compiler/Debug/lib/libmemrep.so] Error 2
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list