From 0ee9bc789499c7725ace1b6973c3fe5d4e8cae67 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 9 Jan 2014 05:29:59 +0000 Subject: 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 --- tools/lli/lli.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() {} -- cgit v1.2.3