Tweak MemoryBuffer to allocate the class itself, the name and possibly the
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 25 Jun 2010 11:50:40 +0000 (11:50 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 25 Jun 2010 11:50:40 +0000 (11:50 +0000)
commitd4d1f85aa751cadf69768746afd2c6c43c116ac2
tree5c2b959fcc12b5182b74682df1b4e3784b4d3032
parent2bf4b3be5ca34d822ae7a79e9f2df655da8e0aa8
Tweak MemoryBuffer to allocate the class itself, the name and possibly the
buffer in the same chunk of memory.

2 less mallocs for every uninitialized MemoryBuffer and 1 less malloc for every
MemoryBuffer pointing to a memory range translate into 20% less mallocs on
clang -cc1 -Eonly Cocoa_h.m.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106839 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/MemoryBuffer.h
lib/Support/MemoryBuffer.cpp