Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions lib/CppInterOp/Compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@
#define fileno _fileno
#endif

static inline char* GetEnv(const char* Var_Name) {
#ifdef _MSC_VER
char* Env = nullptr;
size_t sz = 0;
getenv_s(&sz, Env, sz, Var_Name);
return Env;
#else
return getenv(Var_Name);
#endif
}

#if CLANG_VERSION_MAJOR < 19
#define Template_Deduction_Result Sema::TemplateDeductionResult
#define Template_Deduction_Result_Success \
Expand Down
4 changes: 2 additions & 2 deletions lib/CppInterOp/DynamicLibraryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
//------------------------------------------------------------------------------

#include "DynamicLibraryManager.h"
#include "Compatibility.h"
#include "Paths.h"

#include "llvm/ADT/StringSet.h"
Expand All @@ -23,6 +22,7 @@
#include "llvm/Support/Endian.h"
#endif

#include <cstdlib>
#include <fstream>
#include <sys/stat.h>
#include <system_error>
Expand Down Expand Up @@ -53,7 +53,7 @@ DynamicLibraryManager::DynamicLibraryManager() {
// Behaviour is to not add paths that don't exist...In an interpreted env
// does this make sense? Path could pop into existence at any time.
for (const char* Var : kSysLibraryEnv) {
if (const char* Env = GetEnv(Var)) {
if (const char* Env = std::getenv(Var)) {
SmallVector<StringRef, 10> CurPaths;
SplitPaths(Env, CurPaths, utils::kPruneNonExistent,
Cpp::utils::platform::kEnvDelim);
Expand Down
1 change: 0 additions & 1 deletion lib/CppInterOp/Paths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
//------------------------------------------------------------------------------

#include "Paths.h"
#include "Compatibility.h"

#include "clang/Basic/FileManager.h"
#include "clang/Lex/HeaderSearchOptions.h"
Expand Down
Loading