From: Enrico Granata Date: Wed, 28 Jan 2015 18:45:28 +0000 (+0000) Subject: As promised, make this more efficient by only doing all the busy work when necessary X-Git-Tag: llvmorg-3.7.0-rc1~13827 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e0255c76924f19fe0e4e6dd0de413bbc0ea761c;p=platform%2Fupstream%2Fllvm.git As promised, make this more efficient by only doing all the busy work when necessary llvm-svn: 227342 --- 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; }