OSDN Git Service

Fix initializing the allocator before creating empty vector.
authorNicolas Capens <capn@google.com>
Tue, 6 Sep 2016 16:59:58 +0000 (12:59 -0400)
committerNicolas Capens <nicolascapens@google.com>
Fri, 9 Sep 2016 14:14:31 +0000 (14:14 +0000)
commita9a92a5edb64fac48bc300bc257f1e75612b4cb6
tree35ae79d525165b4a5d8b63a2a0eccf586a037b66
parent86e5d883047328790dd7e1931c3cd112765560d7
Fix initializing the allocator before creating empty vector.

MSVC's implementation of the STL allocates memory even for an empty
vector. Since we're using a custom thread-local allocator, it should
be initialized before any STL member containers get initialized.

BUG=swiftshader:7

Change-Id: I4bd977e7ee8eb87006fe08b051cbcfc9bc62342b
Reviewed-on: https://chromium-review.googlesource.com/381531
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Jim Stichnoth <stichnot@chromium.org>
src/IceCfg.cpp
src/IceCfg.h
src/IceMemory.cpp
src/IceMemory.h