diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 16:06:50 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 16:06:50 +0000 |
commit | e8b555c6bb93cd3431a18a624bff81020bec2a3b (patch) | |
tree | 45b50ac2b2e1fa4149ad5620f34f823a0b85f618 /llvm/lib/IR/LLVMContext.cpp | |
parent | d6b44aad313c3d3dbb1f0749301eb79e8a9ba32c (diff) | |
download | llvm-e8b555c6bb93cd3431a18a624bff81020bec2a3b.zip llvm-e8b555c6bb93cd3431a18a624bff81020bec2a3b.tar.gz llvm-e8b555c6bb93cd3431a18a624bff81020bec2a3b.tar.bz2 |
IR: Use Optional instead of unique_ptr for debug info ODR type map, NFC
Save a level of malloc indirection.
llvm-svn: 266749
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 0d4f724..45c2806 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -317,8 +317,7 @@ void LLVMContext::enableDebugTypeODRUniquing() { if (pImpl->DITypeMap) return; - pImpl->DITypeMap = - llvm::make_unique<DenseMap<const MDString *, DICompositeType *>>(); + pImpl->DITypeMap.emplace(); } void LLVMContext::disableDebugTypeODRUniquing() { pImpl->DITypeMap.reset(); } |