diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-09-03 13:22:51 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-09-03 13:22:51 +0000 |
commit | 68c016aea0b61f649b9d9ba65c7d7217e0c0f6cb (patch) | |
tree | b0926cc43f6e73470de5979587ebe2da942f088f /lib/lsan/lsan.cc | |
parent | 1dcd1d9d1c86ab9b728386d261fbebe00b32e097 (diff) |
ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/lsan/lsan.cc')
-rw-r--r-- | lib/lsan/lsan.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/lsan/lsan.cc b/lib/lsan/lsan.cc index 22e18e2a9..99b165b5d 100644 --- a/lib/lsan/lsan.cc +++ b/lib/lsan/lsan.cc @@ -25,8 +25,7 @@ namespace __lsan { static void InitializeCommonFlags() { CommonFlags *cf = common_flags(); cf->external_symbolizer_path = GetEnv("LSAN_SYMBOLIZER_PATH"); - cf->symbolize = (cf->external_symbolizer_path && - cf->external_symbolizer_path[0]); + cf->symbolize = true; cf->strip_path_prefix = ""; cf->fast_unwind_on_malloc = true; cf->malloc_context_size = 30; @@ -53,10 +52,8 @@ void Init() { SetCurrentThread(tid); // Start symbolizer process if necessary. - const char* external_symbolizer = common_flags()->external_symbolizer_path; - if (common_flags()->symbolize && external_symbolizer && - external_symbolizer[0]) { - InitializeExternalSymbolizer(external_symbolizer); + if (common_flags()->symbolize) { + InitializeExternalSymbolizer(common_flags()->external_symbolizer_path); } InitCommonLsan(); |