diff options
| author | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-10-20 16:00:45 +0000 |
|---|---|---|
| committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2010-10-20 16:00:45 +0000 |
| commit | dc47d592e7b2829608d85eb293d2ac0d6620f847 (patch) | |
| tree | 2e21da8a480bd7a62059785c06aeb456c112ae1f /llvm/lib/System | |
| parent | 9748310eabd7928129cf6a8e2faa7890e6b61bdf (diff) | |
| download | bcm5719-llvm-dc47d592e7b2829608d85eb293d2ac0d6620f847.tar.gz bcm5719-llvm-dc47d592e7b2829608d85eb293d2ac0d6620f847.zip | |
Use C++03...
llvm-svn: 116927
Diffstat (limited to 'llvm/lib/System')
| -rw-r--r-- | llvm/lib/System/Win32/Path.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/System/Win32/Path.inc b/llvm/lib/System/Win32/Path.inc index 2dbf13e8ccb..7e2275105a3 100644 --- a/llvm/lib/System/Win32/Path.inc +++ b/llvm/lib/System/Win32/Path.inc @@ -68,7 +68,12 @@ Path::operator=(StringRef that) { struct ScopedNullTerminator { std::string &str; ScopedNullTerminator(std::string &s) : str(s) { str.push_back(0); } - ~ScopedNullTerminator() { str.pop_back(); } + ~ScopedNullTerminator() { + // str.pop_back(); But wait, C++03 doesn't have this... + assert(!str.empty() && str[str.size() - 1] == 0 + && "Null char not present!"); + str.resize(str.size() - 1); + } }; bool |

