summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/SourceMgr.cpp
diff options
context:
space:
mode:
authorGabor Horvath <xazax.hun@gmail.com>2017-05-01 16:18:42 +0000
committerGabor Horvath <xazax.hun@gmail.com>2017-05-01 16:18:42 +0000
commit43b72d538f9f76afd38a59423e587083801125e8 (patch)
treeec031c25421027a201c3dbcdb6a2058554fdf13d /llvm/lib/Support/SourceMgr.cpp
parent6b1b630a984bbb3c5f1fcc01d02770d98ebb6d6a (diff)
downloadbcm5719-llvm-43b72d538f9f76afd38a59423e587083801125e8.tar.gz
bcm5719-llvm-43b72d538f9f76afd38a59423e587083801125e8.zip
Remove unnecessary conditions as suggested by clang-tidy. NFC
Patch by: Gergely Angeli! Differential Revision: https://reviews.llvm.org/D31936 llvm-svn: 301807
Diffstat (limited to 'llvm/lib/Support/SourceMgr.cpp')
-rw-r--r--llvm/lib/Support/SourceMgr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Support/SourceMgr.cpp b/llvm/lib/Support/SourceMgr.cpp
index ca2391c10ff..5199fad7d9e 100644
--- a/llvm/lib/Support/SourceMgr.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud