From 68c016aea0b61f649b9d9ba65c7d7217e0c0f6cb Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Tue, 3 Sep 2013 13:22:51 +0000 Subject: 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 --- lib/lsan/lsan.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/lsan/lsan.cc') 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(); -- cgit v1.2.3