[LLVMdev] SparseBitVector compile warning

OvermindDL1 overminddl1 at gmail.com
Tue May 12 14:43:09 PDT 2009


The warning is:
R:\SDKs\llvm\trunk\include\llvm/ADT/SparseBitVector.h(58) : warning
C4099: 'llvm::ilist_sentinel_traits<llvm::SparseBitVectorElement<ElementSize>>'
: type name first seen using 'struct' now seen using 'class'
        R:\SDKs\llvm\trunk\include\llvm/ADT/SparseBitVector.h(275) :
see reference to class template instantiation
'llvm::SparseBitVectorElement<ElementSize>' being compiled
R:\SDKs\llvm\trunk\include\llvm/ADT/SparseBitVector.h(58) : warning
C4099: 'llvm::ilist_sentinel_traits<NodeTy>' : type name first seen
using 'struct' now seen using 'class'
        with
        [
            NodeTy=llvm::SparseBitVectorElement<128>
        ]
        R:\SDKs\llvm\trunk\include\llvm/ADT/SparseBitVector.h(283) :
see reference to class template instantiation
'llvm::SparseBitVectorElement<ElementSize>' being compiled
        with
        [
            ElementSize=128
        ]
        ..\..\..\..\trunk\lib\Analysis\IPA\Andersens.cpp(108) : see
reference to class template instantiation 'llvm::SparseBitVector<>'
being compiled


The problem is in the SpareBitVector.h file, line 58:
  friend class ilist_sentinel_traits<SparseBitVectorElement>;
It should be struct, not class, as ilist_sentinel_traits is a struct,
not a class:
  friend struct ilist_sentinel_traits<SparseBitVectorElement>;



More information about the llvm-dev mailing list