Genericize implementation of GetDLLSuffix now that we have LTDL_SHLIB_EXT
available.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18904 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/System/AIX/Path.cpp b/lib/System/AIX/Path.cpp
index 8eddb96..56a006d 100644
--- a/lib/System/AIX/Path.cpp
+++ b/lib/System/AIX/Path.cpp
@@ -48,11 +48,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "so";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/Cygwin/Path.cpp b/lib/System/Cygwin/Path.cpp
index 01a40da..43dae2f 100644
--- a/lib/System/Cygwin/Path.cpp
+++ b/lib/System/Cygwin/Path.cpp
@@ -47,11 +47,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "dll.a";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/Darwin/Path.cpp b/lib/System/Darwin/Path.cpp
index ed39107..d34ad80 100644
--- a/lib/System/Darwin/Path.cpp
+++ b/lib/System/Darwin/Path.cpp
@@ -43,11 +43,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "dylib";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/FreeBSD/Path.cpp b/lib/System/FreeBSD/Path.cpp
index 7dac6fd..837f830 100644
--- a/lib/System/FreeBSD/Path.cpp
+++ b/lib/System/FreeBSD/Path.cpp
@@ -45,11 +45,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "so";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/Interix/Path.cpp b/lib/System/Interix/Path.cpp
index 45ab13a..4fb38cb 100644
--- a/lib/System/Interix/Path.cpp
+++ b/lib/System/Interix/Path.cpp
@@ -45,11 +45,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "dll";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/Linux/Path.cpp b/lib/System/Linux/Path.cpp
index 5238c1f..d0eccb7 100644
--- a/lib/System/Linux/Path.cpp
+++ b/lib/System/Linux/Path.cpp
@@ -45,11 +45,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "so";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/Path.cpp b/lib/System/Path.cpp
index 1a6d030..d0ee1a3 100644
--- a/lib/System/Path.cpp
+++ b/lib/System/Path.cpp
@@ -12,6 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/System/Path.h"
+#include "llvm/Config/config.h"
 #include <cassert>
 
 namespace llvm {
@@ -80,6 +81,11 @@
   return sys::Path();
 }
 
+std::string
+Path::GetDLLSuffix() {
+  return LTDL_SHLIB_EXT;
+}
+
 }
 
 // Include the truly platform-specific parts of this class.
diff --git a/lib/System/SunOS/Path.cpp b/lib/System/SunOS/Path.cpp
index db6db19..346615d 100644
--- a/lib/System/SunOS/Path.cpp
+++ b/lib/System/SunOS/Path.cpp
@@ -47,11 +47,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "so";
-}
-
 }
 
 // vim: sw=2 smartindent smarttab tw=80 autoindent expandtab
diff --git a/lib/System/Win32/Path.cpp b/lib/System/Win32/Path.cpp
index 8201dd4..e847154 100644
--- a/lib/System/Win32/Path.cpp
+++ b/lib/System/Win32/Path.cpp
@@ -118,11 +118,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "dll";
-}
-
 static void getPathList(const char*path, std::vector<sys::Path>& Paths) {
   const char* at = path;
   const char* delim = strchr(at, ';');
diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc
index 8201dd4..e847154 100644
--- a/lib/System/Win32/Path.inc
+++ b/lib/System/Win32/Path.inc
@@ -118,11 +118,6 @@
   return result;
 }
 
-std::string
-Path::GetDLLSuffix() {
-  return "dll";
-}
-
 static void getPathList(const char*path, std::vector<sys::Path>& Paths) {
   const char* at = path;
   const char* delim = strchr(at, ';');