summaryrefslogtreecommitdiffstats
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
commitf9dd8fdc5e02414e759248fea20b6958a0e8fbd8 (patch)
tree6d9bc910aa0ab6a595c0260a8efdafbb99046c5a
parent1ddecc0777e935e75da5cc767be2a26f75421ce7 (diff)
downloadbcm5719-llvm-f9dd8fdc5e02414e759248fea20b6958a0e8fbd8.tar.gz
bcm5719-llvm-f9dd8fdc5e02414e759248fea20b6958a0e8fbd8.zip
Fix accidental use of the exotic "std::string::back()" method. Turns out it's
new in C++11. llvm-svn: 198853
-rw-r--r--llvm/tools/lli/lli.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index 5694715d128..0227261f485 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/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() {}
OpenPOWER on IntegriCloud