From 79fc9249574cee0ec69d920e5a16497ba799020a Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 13 Dec 2004 18:41:28 +0000 Subject: [PATCH] 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 --- lib/System/AIX/Path.cpp | 5 ----- lib/System/Cygwin/Path.cpp | 5 ----- lib/System/Darwin/Path.cpp | 5 ----- lib/System/FreeBSD/Path.cpp | 5 ----- lib/System/Interix/Path.cpp | 5 ----- lib/System/Linux/Path.cpp | 5 ----- lib/System/Path.cpp | 6 ++++++ lib/System/SunOS/Path.cpp | 5 ----- lib/System/Win32/Path.cpp | 5 ----- lib/System/Win32/Path.inc | 5 ----- 10 files changed, 6 insertions(+), 45 deletions(-) diff --git a/lib/System/AIX/Path.cpp b/lib/System/AIX/Path.cpp index 8eddb967bd3..56a006dbad9 100644 --- a/lib/System/AIX/Path.cpp +++ b/lib/System/AIX/Path.cpp @@ -48,11 +48,6 @@ Path::GetTemporaryDirectory() { 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 01a40da4e7c..43dae2f982b 100644 --- a/lib/System/Cygwin/Path.cpp +++ b/lib/System/Cygwin/Path.cpp @@ -47,11 +47,6 @@ Path::GetTemporaryDirectory() { 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 ed391079487..d34ad80ef22 100644 --- a/lib/System/Darwin/Path.cpp +++ b/lib/System/Darwin/Path.cpp @@ -43,11 +43,6 @@ Path::GetTemporaryDirectory() { 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 7dac6fd5e98..837f830c4fe 100644 --- a/lib/System/FreeBSD/Path.cpp +++ b/lib/System/FreeBSD/Path.cpp @@ -45,11 +45,6 @@ Path::GetTemporaryDirectory() { 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 45ab13a6dc6..4fb38cb1f5a 100644 --- a/lib/System/Interix/Path.cpp +++ b/lib/System/Interix/Path.cpp @@ -45,11 +45,6 @@ Path::GetTemporaryDirectory() { 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 5238c1f329b..d0eccb783f1 100644 --- a/lib/System/Linux/Path.cpp +++ b/lib/System/Linux/Path.cpp @@ -45,11 +45,6 @@ Path::GetTemporaryDirectory() { 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 1a6d030f896..d0ee1a3ae89 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 namespace llvm { @@ -80,6 +81,11 @@ Path::FindLibrary(std::string& name) { 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 db6db19c38b..346615d55c2 100644 --- a/lib/System/SunOS/Path.cpp +++ b/lib/System/SunOS/Path.cpp @@ -47,11 +47,6 @@ Path::GetTemporaryDirectory() { 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 8201dd4ab22..e847154e583 100644 --- a/lib/System/Win32/Path.cpp +++ b/lib/System/Win32/Path.cpp @@ -118,11 +118,6 @@ Path::GetRootDirectory() { return result; } -std::string -Path::GetDLLSuffix() { - return "dll"; -} - static void getPathList(const char*path, std::vector& 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 8201dd4ab22..e847154e583 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -118,11 +118,6 @@ Path::GetRootDirectory() { return result; } -std::string -Path::GetDLLSuffix() { - return "dll"; -} - static void getPathList(const char*path, std::vector& Paths) { const char* at = path; const char* delim = strchr(at, ';');