diff options
Diffstat (limited to 'tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp')
-rw-r--r-- | tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp b/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp index 21a25b3..f8492ed 100644 --- a/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp +++ b/tools/llvmc/example/mcc16/plugins/PIC16Base/PluginMain.cpp @@ -10,13 +10,17 @@ namespace llvmc { } // Returns the platform specific directory separator via #ifdefs. -static std::string GetDirSeparator(void) { +static std::string GetDirSeparator() { +#ifdef _WIN32 + return "\\"; +#else return "/"; +#endif } namespace hooks { // Get the dir where c16 executables reside. -std::string GetBinDir (void) { +std::string GetBinDir() { // Construct a Path object from the program name. void *P = (void*) (intptr_t) GetBinDir; sys::Path ProgramFullPath @@ -30,7 +34,7 @@ std::string GetBinDir (void) { } // Get the Top-level Installation dir for c16. -std::string GetInstallDir (void) { +std::string GetInstallDir() { sys::Path BinDirPath = sys::Path(GetBinDir()); // Go one more level up to get the install dir. @@ -40,22 +44,22 @@ std::string GetInstallDir (void) { } // Get the dir where the c16 header files reside. -std::string GetStdHeadersDir (void) { +std::string GetStdHeadersDir() { return GetInstallDir() + "include"; } // Get the dir where the assembler header files reside. -std::string GetStdAsmHeadersDir (void) { +std::string GetStdAsmHeadersDir() { return GetInstallDir() + "inc"; } // Get the dir where the linker scripts reside. -std::string GetStdLinkerScriptsDir (void) { +std::string GetStdLinkerScriptsDir() { return GetInstallDir() + "lkr"; } // Get the dir where startup code, intrinsics and lib reside. -std::string GetStdLibsDir (void) { +std::string GetStdLibsDir() { return GetInstallDir() + "lib"; } } |