[LLVMdev] Remove class/struct DenseMapInfo mix

Marius Wachtler malloc at inode.at
Mon Oct 26 19:10:31 PDT 2009


Hello

Visual Studio is complaining about the mix of struct and class.

2>C:\dev\llvm\include\llvm/ADT/ValueMap.h(202) : warning C4099:
'llvm::DenseMapInfo<llvm::ValueMapCallbackVH<KeyT,ValueT,Config,ValueInfoT>>'
: type name first seen using 'struct' now seen using 'class'
2>        C:\dev\llvm\include\llvm/ADT/ValueMap.h(251) : see reference to
class template instantiation
'llvm::ValueMapCallbackVH<KeyT,ValueT,Config,ValueInfoT>' being compiled


Below you can find a patch which removes the warning.

Marius Wachtler



Index: include/llvm/ADT/ValueMap.h
===================================================================
--- include/llvm/ADT/ValueMap.h    (revision 85194)
+++ include/llvm/ADT/ValueMap.h    (working copy)
@@ -199,7 +199,7 @@
 template<typename KeyT, typename ValueT, typename Config, typename
ValueInfoT>
 class ValueMapCallbackVH : public CallbackVH {
   friend class ValueMap<KeyT, ValueT, Config, ValueInfoT>;
-  friend class DenseMapInfo<ValueMapCallbackVH>;
+  friend struct DenseMapInfo<ValueMapCallbackVH>;
   typedef ValueMap<KeyT, ValueT, Config, ValueInfoT> ValueMapT;
   typedef typename llvm::remove_pointer<KeyT>::type KeySansPointerT;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091027/967bbb9c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: structclassmix.patch
Type: application/octet-stream
Size: 650 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091027/967bbb9c/attachment.obj>


More information about the llvm-dev mailing list