aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2013-03-30 15:23:08 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2013-03-30 15:23:08 +0000
commitddcc82b871e2033ed3e566be8e7303aac5cde471 (patch)
treea4a50eed95b05533b4c9bc0647a0ff176e2e3320
parentb24fc1c7f7545362fe283730d5532fa7e7375c9e (diff)
Put private class into an anonmyous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178420 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Support/MemoryBuffer.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Support/MemoryBuffer.cpp b/lib/Support/MemoryBuffer.cpp
index 8042237253..7c5ab96a76 100644
--- a/lib/Support/MemoryBuffer.cpp
+++ b/lib/Support/MemoryBuffer.cpp
@@ -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));