[LLVMdev] Adding DenseMap::FindAndConstruct with a default value

Chris Lattner sabre at nondot.org
Thu Jun 5 23:24:32 PDT 2008


On Jun 5, 2008, at 7:49 AM, Matthijs Kooijman wrote:
> However, I'm using an enum as a map value, so when you do Map[Key]  
> while Key
> is not yet in the map, the new value will be unitialized (I can't  
> define a
> constructor on an enum, right?).

DenseMap should be initializing new values with x = ValueT();  This  
will properly zero initialize for ints, enums etc. AFAIK.

-Chris



More information about the llvm-dev mailing list