mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 02:33:33 +00:00
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:
parent
b24fc1c7f7
commit
ddcc82b871
@ -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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user