[compiler-rt] r180082 - [Sanitizer] Delete unused function
Alexey Samsonov
samsonov at google.com
Tue Apr 23 01:18:09 PDT 2013
Author: samsonov
Date: Tue Apr 23 03:18:09 2013
New Revision: 180082
URL: http://llvm.org/viewvc/llvm-project?rev=180082&view=rev
Log:
[Sanitizer] Delete unused function
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h?rev=180082&r1=180081&r2=180082&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Tue Apr 23 03:18:09 2013
@@ -130,7 +130,6 @@ void DisableCoreDumper();
void DumpProcessMap();
bool FileExists(const char *filename);
const char *GetEnv(const char *name);
-bool SetEnv(const char *name, const char *value);
const char *GetPwd();
u32 GetUid();
void ReExec();
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=180082&r1=180081&r2=180082&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Tue Apr 23 03:18:09 2013
@@ -264,20 +264,6 @@ const char *GetEnv(const char *name) {
return 0; // Not found.
}
-// Does not compile for Go because dlsym() requires -ldl
-#ifndef SANITIZER_GO
-bool SetEnv(const char *name, const char *value) {
- void *f = dlsym(RTLD_NEXT, "setenv");
- if (f == 0)
- return false;
- typedef int(*setenv_ft)(const char *name, const char *value, int overwrite);
- setenv_ft setenv_f;
- CHECK_EQ(sizeof(setenv_f), sizeof(f));
- internal_memcpy(&setenv_f, &f, sizeof(f));
- return setenv_f(name, value, 1) == 0;
-}
-#endif
-
#ifdef __GLIBC__
extern "C" {
More information about the llvm-commits
mailing list