From 7e0255c76924f19fe0e4e6dd0de413bbc0ea761c Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 28 Jan 2015 18:45:28 +0000 Subject: [PATCH] As promised, make this more efficient by only doing all the busy work when necessary llvm-svn: 227342 --- lldb/source/Symbol/ClangASTType.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lldb/source/Symbol/ClangASTType.cpp b/lldb/source/Symbol/ClangASTType.cpp index 9095888..6dc4063 100644 --- a/lldb/source/Symbol/ClangASTType.cpp +++ b/lldb/source/Symbol/ClangASTType.cpp @@ -2084,13 +2084,13 @@ ClangASTType::GetBitSize (ExecutionContext *exe_ctx) const else { static bool g_printed = false; - StreamString s; - s.Printf("warning: trying to determine the size of type "); - DumpTypeDescription(&s); - s.Printf("\n without a valid ExecutionContext. this is not reliable. please file a bug against LLDB.\nbacktrace:\n"); - Host::Backtrace(s, 10); if (!g_printed) { + StreamString s; + s.Printf("warning: trying to determine the size of type "); + DumpTypeDescription(&s); + s.Printf("\n without a valid ExecutionContext. this is not reliable. please file a bug against LLDB.\nbacktrace:\n"); + Host::Backtrace(s, 10); printf("%s\n", s.GetData()); g_printed = true; } -- 2.7.4