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
This commit is contained in:
Lang Hames 2014-01-09 05:29:59 +00:00
parent 4442b6ec3a
commit 0ee9bc7894

View File

@ -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() {}