diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-12-02 22:20:11 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-12-02 22:20:11 +0000 |
commit | 30ce7beb1ac62e90468747a2d0ab1111467da8b4 (patch) | |
tree | 6c768fdba6a8fc2a70a437e6dc705f02b2b8211b /lib/sanitizer_common/sanitizer_common.cc | |
parent | a9c8d49ab44c6802d8257706e208fb88f2f09e71 (diff) |
Replace InternalScopedBuffer<char> with InternalScopedString where applicable.
Summary: No functionality change.
Test Plan: make check-all
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6472
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@223164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.cc b/lib/sanitizer_common/sanitizer_common.cc index c77e50e70..737177c9d 100644 --- a/lib/sanitizer_common/sanitizer_common.cc +++ b/lib/sanitizer_common/sanitizer_common.cc @@ -166,9 +166,8 @@ const char *StripModuleName(const char *module) { void ReportErrorSummary(const char *error_message) { if (!common_flags()->print_summary) return; - InternalScopedBuffer<char> buff(kMaxSummaryLength); - internal_snprintf(buff.data(), buff.size(), - "SUMMARY: %s: %s", SanitizerToolName, error_message); + InternalScopedString buff(kMaxSummaryLength); + buff.append("SUMMARY: %s: %s", SanitizerToolName, error_message); __sanitizer_report_error_summary(buff.data()); } @@ -176,11 +175,11 @@ void ReportErrorSummary(const char *error_type, const char *file, int line, const char *function) { if (!common_flags()->print_summary) return; - InternalScopedBuffer<char> buff(kMaxSummaryLength); - internal_snprintf( - buff.data(), buff.size(), "%s %s:%d %s", error_type, - file ? StripPathPrefix(file, common_flags()->strip_path_prefix) : "??", - line, function ? function : "??"); + InternalScopedString buff(kMaxSummaryLength); + buff.append("%s %s:%d %s", error_type, + file ? StripPathPrefix(file, common_flags()->strip_path_prefix) + : "??", + line, function ? function : "??"); ReportErrorSummary(buff.data()); } |