Add comment.
[oota-llvm.git] / lib / System / Path.cpp
index 144959755efb83f92ae31890536810043feddb89..11035cfee7aa55d6ba55973905eeebd730a44934 100644 (file)
@@ -14,6 +14,7 @@
 #include "llvm/System/Path.h"
 #include "llvm/Config/config.h"
 #include <cassert>
+#include <cstring>
 #include <ostream>
 using namespace llvm;
 using namespace sys;
@@ -171,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)