diff options
Diffstat (limited to 'lib/System/Path.cpp')
-rw-r--r-- | lib/System/Path.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp index 6f0667fba5..11035cfee7 100644 --- a/lib/System/Path.cpp +++ b/lib/System/Path.cpp @@ -172,7 +172,10 @@ bool Path::hasMagicNumber(const std::string &Magic) const { 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) |