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 | ed8fdb2a0e9503abbac7c0927d2915cd8bac03d2 (patch) | |
tree | ada4253e3e564ec1531ca53c5eab3b9fb329f485 /llvm/lib/IR/LLVMContext.cpp | |
parent | 51a9bd2e110f43eb9df14e1daffd89fd0332b9f0 (diff) | |
download | llvm-ed8fdb2a0e9503abbac7c0927d2915cd8bac03d2.zip llvm-ed8fdb2a0e9503abbac7c0927d2915cd8bac03d2.tar.gz llvm-ed8fdb2a0e9503abbac7c0927d2915cd8bac03d2.tar.bz2 |
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
llvm-svn: 266713
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 3fc79ed..e166a55 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/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]; } |