[compiler-rt] r197031 - [msandr] Remove one more use of std::string and put all STL headers under ifdef.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed Dec 11 03:38:49 PST 2013
Author: eugenis
Date: Wed Dec 11 05:38:49 2013
New Revision: 197031
URL: http://llvm.org/viewvc/llvm-project?rev=197031&view=rev
Log:
[msandr] Remove one more use of std::string and put all STL headers under ifdef.
Modified:
compiler-rt/trunk/lib/msandr/msandr.cc
Modified: compiler-rt/trunk/lib/msandr/msandr.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msandr/msandr.cc?rev=197031&r1=197030&r2=197031&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msandr/msandr.cc (original)
+++ compiler-rt/trunk/lib/msandr/msandr.cc Wed Dec 11 05:38:49 2013
@@ -39,11 +39,22 @@
#include <sys/mman.h>
#include <sys/syscall.h> /* for SYS_mmap */
+#include <string.h>
+
+// XXX: it seems setting macro in CMakeLists.txt does not work,
+// so manually set it here now.
+
+// Building msandr client for running in DynamoRIO hybrid mode,
+// which allows some module running natively.
+// TODO: turn it on by default when hybrid is stable enough
+// #define MSANDR_NATIVE_EXEC
+
+#ifndef MSANDR_NATIVE_EXEC
#include <algorithm>
-#include <string>
#include <set>
+#include <string>
#include <vector>
-#include <string.h>
+#endif
#define TESTALL(mask, var) (((mask) & (var)) == (mask))
#define TESTANY(mask, var) (((mask) & (var)) != 0)
@@ -60,14 +71,6 @@
#define VERBOSITY 0
-// XXX: it seems setting macro in CMakeLists.txt does not work,
-// so manually set it here now.
-
-// Building msandr client for running in DynamoRIO hybrid mode,
-// which allows some module running natively.
-// TODO: turn it on by default when hybrid is stable enough
-// #define MSANDR_NATIVE_EXEC
-
// Building msandr client for standalone test that does not need to
// run with msan build executables. Disable by default.
// #define MSANDR_STANDALONE_TEST
@@ -91,8 +94,6 @@
namespace {
-std::string g_app_path;
-
int msan_retval_tls_offset;
int msan_param_tls_offset;
@@ -186,7 +187,6 @@ void InitializeMSanCallbacks() {
dr_get_application_name());
CHECK(app);
}
- g_app_path = app->full_path;
__msan_get_retval_tls_offset = (int (*)())
LookupCallback(app, "__msan_get_retval_tls_offset");
More information about the llvm-commits
mailing list