From: Lang Hames Date: Thu, 9 Jan 2014 05:29:59 +0000 (+0000) Subject: Fix accidental use of the exotic "std::string::back()" method. Turns out it's X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0ee9bc789499c7725ace1b6973c3fe5d4e8cae67;p=oota-llvm.git 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 --- 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() {}