[llvm] r198853 - Fix accidental use of the exotic "std::string::back()" method. Turns out it's
Lang Hames
lhames at gmail.com
Wed Jan 8 21:30:00 PST 2014
Author: lhames
Date: Wed Jan 8 23:29:59 2014
New Revision: 198853
URL: http://llvm.org/viewvc/llvm-project?rev=198853&view=rev
Log:
Fix accidental use of the exotic "std::string::back()" method. Turns out it's
new in C++11.
Modified:
llvm/trunk/tools/lli/lli.cpp
Modified: llvm/trunk/tools/lli/lli.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=198853&r1=198852&r2=198853&view=diff
==============================================================================
--- llvm/trunk/tools/lli/lli.cpp (original)
+++ llvm/trunk/tools/lli/lli.cpp Wed Jan 8 23:29:59 2014
@@ -256,7 +256,8 @@ class LLIObjectCache : public ObjectCach
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() {}
More information about the llvm-commits
mailing list