summaryrefslogtreecommitdiff
path: root/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-02 18:30:13 +0000
commita303c417bbdb53703c2c17398b08486bde78f1f6 (patch)
tree98366d6b93d863cefdc53f16c66c0c5ae7fb2261 /lib/Support/SourceMgr.cpp
parent12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (diff)
Notes
Diffstat (limited to 'lib/Support/SourceMgr.cpp')
-rw-r--r--lib/Support/SourceMgr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Support/SourceMgr.cpp b/lib/Support/SourceMgr.cpp
index ca2391c10ff1..5199fad7d9e9 100644
--- a/lib/Support/SourceMgr.cpp
+++ b/lib/Support/SourceMgr.cpp
@@ -51,9 +51,7 @@ static LineNoCacheTy *getCache(void *Ptr) {
}
SourceMgr::~SourceMgr() {
- // Delete the line # cache if allocated.
- if (LineNoCacheTy *Cache = getCache(LineNoCache))
- delete Cache;
+ delete getCache(LineNoCache);
}
unsigned SourceMgr::AddIncludeFile(const std::string &Filename,