aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Path.cpp')
-rw-r--r--lib/System/Path.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp
index 6f0667f..11035cf 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)