IR: Add MDLocation class

Add a new subclass of `UniquableMDNode`, `MDLocation`.  This will be the
IR version of `DebugLoc` and `DILocation`.  The goal is to rename this
to `DILocation` once the IR classes supersede the `DI`-prefixed
wrappers.

This isn't used anywhere yet.  Part of PR21433.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225824 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2015-01-13 20:44:56 +00:00
parent 9e495c518c
commit d640962656
7 changed files with 266 additions and 4 deletions

View File

@ -140,11 +140,15 @@ LLVMContextImpl::~LLVMContextImpl() {
I->dropAllReferences();
for (auto *I : MDTuples)
I->dropAllReferences();
for (auto *I : MDLocations)
I->dropAllReferences();
for (UniquableMDNode *I : DistinctMDNodes)
I->deleteAsSubclass();
for (MDTuple *I : MDTuples)
delete I;
for (MDLocation *I : MDLocations)
delete I;
// Destroy MDStrings.
MDStringCache.clear();