CppInterOp
C++ Language Interoperability Layer
Loading...
Searching...
No Matches
Functions | Variables
CppInternal::utils::platform Namespace Reference

Functions

bool GetSystemLibraryPaths (llvm::SmallVectorImpl< std::string > &Paths)
 
std::string NormalizePath (const std::string &Path)
 Returns a normalized version of the given Path.
 
void * DLOpen (const std::string &Path, std::string *Err=nullptr)
 Open a handle to a shared library.
 
void DLClose (void *Lib, std::string *Err=nullptr)
 Close a handle to a shared library.
 

Variables

const char *const kEnvDelim
 Platform specific delimiter for splitting environment variables.
 

Function Documentation

◆ DLClose()

void CppInternal::utils::platform::DLClose ( void *  Lib,
std::string *  Err = nullptr 
)

Close a handle to a shared library.

Parameters
[in]Lib- Handle to library from previous call to DLOpen
[out]Err- Write errors to this string when given
Returns
the library handle

Referenced by CppInternal::DynamicLibraryManager::unloadLibrary().

◆ DLOpen()

void * CppInternal::utils::platform::DLOpen ( const std::string &  Path,
std::string *  Err = nullptr 
)

Open a handle to a shared library.

On Unix the lib is opened with RTLD_LAZY|RTLD_GLOBAL flags.

Parameters
[in]Path- Library to open
[out]Err- Write errors to this string when given
Returns
the library handle

Referenced by CppInternal::DynamicLibraryManager::loadLibrary().

◆ GetSystemLibraryPaths()

bool CppInternal::utils::platform::GetSystemLibraryPaths ( llvm::SmallVectorImpl< std::string > &  Paths)

◆ NormalizePath()

std::string CppInternal::utils::platform::NormalizePath ( const std::string &  Path)

Returns a normalized version of the given Path.

Definition at line 100 of file Paths.cpp.

Referenced by CppInternal::DynamicLibraryManager::lookupLibrary(), and CppInternal::DynamicLibraryManager::normalizePath().

Variable Documentation

◆ kEnvDelim

const char* const CppInternal::utils::platform::kEnvDelim
extern

Platform specific delimiter for splitting environment variables.

':' on Unix, and ';' on Windows

Referenced by CppInternal::DynamicLibraryManager::DynamicLibraryManager(), and CppInternal::HandleDynTab().