[compiler-rt] r227633 - Remove unused function.
Alexey Samsonov
vonosmas at gmail.com
Fri Jan 30 15:04:55 PST 2015
Author: samsonov
Date: Fri Jan 30 17:04:54 2015
New Revision: 227633
URL: http://llvm.org/viewvc/llvm-project?rev=227633&view=rev
Log:
Remove unused function.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.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=227633&r1=227632&r2=227633&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common.h Fri Jan 30 17:04:54 2015
@@ -210,7 +210,6 @@ void DisableCoreDumperIfNecessary();
void DumpProcessMap();
bool FileExists(const char *filename);
const char *GetEnv(const char *name);
-bool SetEnv(const char *name, const char *value);
const char *GetPwd();
char *FindPathToBinary(const char *name);
u32 GetUid();
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc?rev=227633&r1=227632&r2=227633&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux_libcdep.cc Fri Jan 30 17:04:54 2015
@@ -120,17 +120,6 @@ void GetThreadStackTopAndBottom(bool at_
*stack_bottom = (uptr)stackaddr;
}
-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;
-}
-
bool SanitizerSetThreadName(const char *name) {
#ifdef PR_SET_NAME
return 0 == prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0); // NOLINT
Modified: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc?rev=227633&r1=227632&r2=227633&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_linux_test.cc Fri Jan 30 17:04:54 2015
@@ -187,14 +187,6 @@ TEST_F(ThreadListerTest, ResetMakesNewTh
ASSERT_TRUE(HasElement(threads_after_extra, extra_tid));
}
-TEST(SanitizerCommon, SetEnvTest) {
- const char kEnvName[] = "ENV_FOO";
- SetEnv(kEnvName, "value");
- EXPECT_STREQ("value", getenv(kEnvName));
- unsetenv(kEnvName);
- EXPECT_EQ(0, getenv(kEnvName));
-}
-
#if defined(__x86_64__) || defined(__i386__)
void *thread_self_offset_test_func(void *arg) {
bool result =
More information about the llvm-commits
mailing list