diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 04:55:25 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 04:55:25 +0000 |
commit | 2663f35684efb79e08b26cdd359ff64c429ad2d3 (patch) | |
tree | 2d92f97d80bdbfa49dc0c33a6fe305010ed97701 /lib/IR/LLVMContext.cpp | |
parent | 4576e07c30369b63cdbac00033ae70113979c05d (diff) |
IR: Rename API for enabling ODR uniquing of DITypes, NFC
As per David's review, rename everything in the new API for ODR type
uniquing of debug info.
ensureDITypeMap => enableDebugTypeODRUniquing
destroyDITypeMap => disableDebugTypeODRUniquing
hasDITypeMap => isODRUniquingDebugTypes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/LLVMContext.cpp')
-rw-r--r-- | lib/IR/LLVMContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/IR/LLVMContext.cpp b/lib/IR/LLVMContext.cpp index 3fc79ed03c3..e166a551ade 100644 --- a/lib/IR/LLVMContext.cpp +++ b/lib/IR/LLVMContext.cpp @@ -311,19 +311,19 @@ bool LLVMContext::shouldDiscardValueNames() const { return pImpl->DiscardValueNames; } -bool LLVMContext::hasDITypeMap() const { return !!pImpl->DITypeMap; } +bool LLVMContext::isODRUniquingDebugTypes() const { return !!pImpl->DITypeMap; } -void LLVMContext::ensureDITypeMap() { +void LLVMContext::enableDebugTypeODRUniquing() { if (pImpl->DITypeMap) return; pImpl->DITypeMap = llvm::make_unique<DenseMap<const MDString *, DIType *>>(); } -void LLVMContext::destroyDITypeMap() { pImpl->DITypeMap.reset(); } +void LLVMContext::disableDebugTypeODRUniquing() { pImpl->DITypeMap.reset(); } -DIType **LLVMContext::getOrInsertDITypeMapping(const MDString &S) { - if (!hasDITypeMap()) +DIType **LLVMContext::getOrInsertODRUniquedType(const MDString &S) { + if (!isODRUniquingDebugTypes()) return nullptr; return &(*pImpl->DITypeMap)[&S]; } |