diff options
author | Lang Hames <lhames@gmail.com> | 2014-01-09 05:29:59 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2014-01-09 05:29:59 +0000 |
commit | 0ee9bc789499c7725ace1b6973c3fe5d4e8cae67 (patch) | |
tree | b6124409b0651c7cb537675f0753b411f13efcf9 /tools/lli/lli.cpp | |
parent | 4442b6ec3aa660489d08bbc3889666b519b1d062 (diff) | |
download | llvm-0ee9bc789499c7725ace1b6973c3fe5d4e8cae67.tar.gz llvm-0ee9bc789499c7725ace1b6973c3fe5d4e8cae67.tar.bz2 llvm-0ee9bc789499c7725ace1b6973c3fe5d4e8cae67.tar.xz |
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/lli.cpp')
-rw-r--r-- | tools/lli/lli.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp index 5694715d12..0227261f48 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() {} |