As promised, make this more efficient by only doing all the busy work when necessary
authorEnrico Granata <egranata@apple.com>
Wed, 28 Jan 2015 18:45:28 +0000 (18:45 +0000)
committerEnrico Granata <egranata@apple.com>
Wed, 28 Jan 2015 18:45:28 +0000 (18:45 +0000)
llvm-svn: 227342

lldb/source/Symbol/ClangASTType.cpp

index 9095888..6dc4063 100644 (file)
@@ -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;
                     }