[IRMemoryMap] Avoid redundant zero-init in the Allocation constructor (NFC)
In the lldb-bench/arithmetic benchmark, 1.7% of the total running time
is spent zero-initializing a std::vector that has already been zeroed.
llvm-svn: 339051
diff --git a/lldb/source/Expression/IRMemoryMap.cpp b/lldb/source/Expression/IRMemoryMap.cpp
index 1953e808..6c01c28 100644
--- a/lldb/source/Expression/IRMemoryMap.cpp
+++ b/lldb/source/Expression/IRMemoryMap.cpp
@@ -278,14 +278,10 @@
default:
assert(0 && "We cannot reach this!");
case eAllocationPolicyHostOnly:
- m_data.SetByteSize(size);
- memset(m_data.GetBytes(), 0, size);
- break;
- case eAllocationPolicyProcessOnly:
- break;
case eAllocationPolicyMirror:
m_data.SetByteSize(size);
- memset(m_data.GetBytes(), 0, size);
+ break;
+ case eAllocationPolicyProcessOnly:
break;
}
}