[Lldb-commits] [lldb] r227342 - As promised, make this more efficient by only doing all the busy work when necessary

Enrico Granata egranata at apple.com
Wed Jan 28 10:45:28 PST 2015


Author: enrico
Date: Wed Jan 28 12:45:28 2015
New Revision: 227342

URL: http://llvm.org/viewvc/llvm-project?rev=227342&view=rev
Log:
As promised, make this more efficient by only doing all the busy work when necessary

Modified:
    lldb/trunk/source/Symbol/ClangASTType.cpp

Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=227342&r1=227341&r2=227342&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Wed Jan 28 12:45:28 2015
@@ -2084,13 +2084,13 @@ ClangASTType::GetBitSize (ExecutionConte
                 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;
                     }





More information about the lldb-commits mailing list