commit | 1872ad9888928f4bd87f4c6eee59d17a3d20ad45 | [log] [tgz] |
---|---|---|
author | Anton Korobeynikov <asl@math.spbu.ru> | Wed Feb 20 19:41:22 2008 +0000 |
committer | Anton Korobeynikov <asl@math.spbu.ru> | Wed Feb 20 19:41:22 2008 +0000 |
tree | 1c0317bef2c44694090aef0d9720de26ca59d2df | |
parent | cf193b83204199e1621b2bf17e4ca322bc54e3e2 [diff] |
Add convenient helper to get suffix of the file llvm-svn: 47397
diff --git a/llvm/lib/System/Path.cpp b/llvm/lib/System/Path.cpp index 6f0667f..11035cf 100644 --- a/llvm/lib/System/Path.cpp +++ b/llvm/lib/System/Path.cpp
@@ -172,7 +172,10 @@ return false; } - +std::string +Path::getSuffix() const { + return path.substr(path.rfind('.') + 1); +} // Include the truly platform-specific parts of this class. #if defined(LLVM_ON_UNIX)