Refactor std::list node allocation logic.

The logic to allocate a node within std::list was repeated
in a bunch of places. This is unneeded. This patch refactors
the shared logic into a single function to reduce duplication.

This patch is part of a set to clean up node construction in
general, but refactoring construction requires some more work
to make it work cleanly in C++03

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@316021 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed