diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 14:55:09 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-04-19 14:55:09 +0000 |
commit | 0b0271ef976cec3ee6a1ab2d654e42cf111a68bd (patch) | |
tree | b4425f350e69c433c823dfc993711143958a25fd /llvm/lib/IR/LLVMContext.cpp | |
parent | 171b92f1e159be30fbc29871fefcb09fd05a9016 (diff) | |
download | llvm-0b0271ef976cec3ee6a1ab2d654e42cf111a68bd.zip llvm-0b0271ef976cec3ee6a1ab2d654e42cf111a68bd.tar.gz llvm-0b0271ef976cec3ee6a1ab2d654e42cf111a68bd.tar.bz2 |
IR: getOrInsertODRUniquedType => DICompositeType::getODRType, NFC
Lift the API for debug info ODR type uniquing up a layer. Instead of
clients managing the map directly on the LLVMContext, add a static
method to DICompositeType called getODRType and handle the map in the
background. Also adds DICompositeType::getODRTypeIfExists, so far just
for convenience in the unit tests.
This simplifies the logic in LLParser and BitcodeReader. Because of
argument spam there are actually a few more lines of code now; I'll see
if I come up with a reasonable way to clean that up.
llvm-svn: 266742
Diffstat (limited to 'llvm/lib/IR/LLVMContext.cpp')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 7c0d18d..0d4f724 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -323,12 +323,6 @@ void LLVMContext::enableDebugTypeODRUniquing() { void LLVMContext::disableDebugTypeODRUniquing() { pImpl->DITypeMap.reset(); } -DICompositeType **LLVMContext::getOrInsertODRUniquedType(const MDString &S) { - if (!isODRUniquingDebugTypes()) - return nullptr; - return &(*pImpl->DITypeMap)[&S]; -} - void LLVMContext::setDiscardValueNames(bool Discard) { pImpl->DiscardValueNames = Discard; } |