Put private class into an anonmyous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178420 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2013-03-30 15:23:08 +00:00
parent b24fc1c7f7
commit ddcc82b871

View File

@ -72,10 +72,12 @@ static void CopyStringRef(char *Memory, StringRef Data) {
Memory[Data.size()] = 0; // Null terminate string.
}
namespace {
struct NamedBufferAlloc {
StringRef Name;
NamedBufferAlloc(StringRef Name) : Name(Name) {}
};
}
void *operator new(size_t N, const NamedBufferAlloc &Alloc) {
char *Mem = static_cast<char *>(operator new(N + Alloc.Name.size() + 1));