diff options
author | Stephen Hines <srhines@google.com> | 2014-12-04 02:59:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-12-04 02:59:28 +0000 |
commit | 876d6995443e99d13696f3941c3a789a4daa7c7a (patch) | |
tree | 8fb36d3910e3ee4c4e1b7422f4f017108efc52f5 /lib/IR/LLVMContextImpl.cpp | |
parent | d2327b22152ced7bc46dc629fc908959e8a52d03 (diff) | |
parent | 37ed9c199ca639565f6ce88105f9e39e898d82d0 (diff) | |
download | external_llvm-876d6995443e99d13696f3941c3a789a4daa7c7a.zip external_llvm-876d6995443e99d13696f3941c3a789a4daa7c7a.tar.gz external_llvm-876d6995443e99d13696f3941c3a789a4daa7c7a.tar.bz2 |
Merge "Update aosp/master LLVM for rebase to r222494."
Diffstat (limited to 'lib/IR/LLVMContextImpl.cpp')
-rw-r--r-- | lib/IR/LLVMContextImpl.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/IR/LLVMContextImpl.cpp b/lib/IR/LLVMContextImpl.cpp index 4c2791f..3fd0bb3 100644 --- a/lib/IR/LLVMContextImpl.cpp +++ b/lib/IR/LLVMContextImpl.cpp @@ -40,6 +40,7 @@ LLVMContextImpl::LLVMContextImpl(LLVMContext &C) InlineAsmDiagContext = nullptr; DiagnosticHandler = nullptr; DiagnosticContext = nullptr; + RespectDiagnosticFilters = false; YieldCallback = nullptr; YieldOpaqueHandle = nullptr; NamedStructTypesUniqueID = 0; @@ -75,7 +76,7 @@ LLVMContextImpl::~LLVMContextImpl() { // Free the constants. This is important to do here to ensure that they are // freed before the LeakDetector is torn down. std::for_each(ExprConstants.map_begin(), ExprConstants.map_end(), - DropReferences()); + DropFirst()); std::for_each(ArrayConstants.map_begin(), ArrayConstants.map_end(), DropFirst()); std::for_each(StructConstants.map_begin(), StructConstants.map_end(), @@ -121,20 +122,19 @@ LLVMContextImpl::~LLVMContextImpl() { // Destroy MDNodes. ~MDNode can move and remove nodes between the MDNodeSet // and the NonUniquedMDNodes sets, so copy the values out first. - SmallVector<MDNode*, 8> MDNodes; + SmallVector<GenericMDNode *, 8> MDNodes; MDNodes.reserve(MDNodeSet.size() + NonUniquedMDNodes.size()); - for (FoldingSetIterator<MDNode> I = MDNodeSet.begin(), E = MDNodeSet.end(); - I != E; ++I) - MDNodes.push_back(&*I); + MDNodes.append(MDNodeSet.begin(), MDNodeSet.end()); MDNodes.append(NonUniquedMDNodes.begin(), NonUniquedMDNodes.end()); - for (SmallVectorImpl<MDNode *>::iterator I = MDNodes.begin(), - E = MDNodes.end(); I != E; ++I) - (*I)->destroy(); + for (GenericMDNode *I : MDNodes) + I->dropAllReferences(); + for (GenericMDNode *I : MDNodes) + delete I; assert(MDNodeSet.empty() && NonUniquedMDNodes.empty() && "Destroying all MDNodes didn't empty the Context's sets."); // Destroy MDStrings. - DeleteContainerSeconds(MDStringCache); + MDStringCache.clear(); } // ConstantsContext anchors |