[llvm-commits] [llvm] r118042 - in /llvm/trunk: include/llvm/System/Path.h lib/System/Unix/Path.inc lib/System/Win32/Path.inc

Mikhail Glushenkov foldr at codedgers.com
Tue Nov 2 13:32:26 PDT 2010


Author: foldr
Date: Tue Nov  2 15:32:26 2010
New Revision: 118042

URL: http://llvm.org/viewvc/llvm-project?rev=118042&view=rev
Log:
Path: Add GetEXESuffix() to complement GetDLLSuffix().

Modified:
    llvm/trunk/include/llvm/System/Path.h
    llvm/trunk/lib/System/Unix/Path.inc
    llvm/trunk/lib/System/Win32/Path.inc

Modified: llvm/trunk/include/llvm/System/Path.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/System/Path.h?rev=118042&r1=118041&r2=118042&view=diff
==============================================================================
--- llvm/trunk/include/llvm/System/Path.h (original)
+++ llvm/trunk/include/llvm/System/Path.h Tue Nov  2 15:32:26 2010
@@ -154,6 +154,12 @@
       /// @brief Returns the current working directory.
       static Path GetCurrentDirectory();
 
+      /// Return the suffix commonly used on file names that contain an
+      /// executable.
+      /// @returns The executable file suffix for the current platform.
+      /// @brief Return the executable file suffix.
+      static StringRef GetEXESuffix();
+
       /// Return the suffix commonly used on file names that contain a shared
       /// object, shared archive, or dynamic link library. Such files are
       /// linked at runtime into a process and their code images are shared

Modified: llvm/trunk/lib/System/Unix/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Path.inc?rev=118042&r1=118041&r2=118042&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Path.inc (original)
+++ llvm/trunk/lib/System/Unix/Path.inc Tue Nov  2 15:32:26 2010
@@ -78,6 +78,10 @@
 
 const char sys::PathSeparator = ':';
 
+StringRef Path::GetEXESuffix() {
+  return "";
+}
+
 Path::Path(StringRef p)
   : path(p) {}
 

Modified: llvm/trunk/lib/System/Win32/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Path.inc?rev=118042&r1=118041&r2=118042&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Path.inc (original)
+++ llvm/trunk/lib/System/Win32/Path.inc Tue Nov  2 15:32:26 2010
@@ -45,8 +45,13 @@
 
 namespace llvm {
 namespace sys {
+
 const char PathSeparator = ';';
 
+StringRef Path::GetEXESuffix() {
+  return "exe";
+}
+
 Path::Path(llvm::StringRef p)
   : path(p) {
   FlipBackSlashes(path);





More information about the llvm-commits mailing list