mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Fix a bug in the densemap that was killing the local allocator, and probably
other clients. The problem is that the nullVal member was left to the default constructor to initialize, which for int's does nothing (ie, leaves it unspecified). To get a zero value, we must use T(). It's C++ wonderful? :) llvm-svn: 11867
This commit is contained in:
parent
dbac382e2a
commit
2b315a3577
@ -33,7 +33,7 @@ class DenseMap {
|
||||
ToIndexT toIndex_;
|
||||
|
||||
public:
|
||||
DenseMap() { }
|
||||
DenseMap() : nullVal_(T()) { }
|
||||
|
||||
explicit DenseMap(const T& val) : nullVal_(val) { }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user