summaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2014-01-09 05:29:59 +0000
committerLang Hames <lhames@gmail.com>2014-01-09 05:29:59 +0000
commit0ee9bc789499c7725ace1b6973c3fe5d4e8cae67 (patch)
treeb6124409b0651c7cb537675f0753b411f13efcf9 /tools/lli
parent4442b6ec3aa660489d08bbc3889666b519b1d062 (diff)
Fix accidental use of the exotic "std::string::back()" method. Turns out it's
new in C++11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 5694715d128..0227261f485 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -256,7 +256,8 @@ class LLIObjectCache : public ObjectCache {
public:
LLIObjectCache(const std::string& CacheDir) : CacheDir(CacheDir) {
// Add trailing '/' to cache dir if necessary.
- if (!this->CacheDir.empty() && this->CacheDir.back() != '/')
+ if (!this->CacheDir.empty() &&
+ this->CacheDir[this->CacheDir.size() - 1] != '/')
this->CacheDir += '/';
}
virtual ~LLIObjectCache() {}