[Lldb-commits] [lldb] r177812 - And then again only compute the more expensive piece of data if need be :-)

Enrico Granata egranata at apple.com
Fri Mar 22 18:44:59 PDT 2013


Author: enrico
Date: Fri Mar 22 20:44:59 2013
New Revision: 177812

URL: http://llvm.org/viewvc/llvm-project?rev=177812&view=rev
Log:
And then again only compute the more expensive piece of data if need be :-)

Modified:
    lldb/trunk/source/Core/ValueObject.cpp

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=177812&r1=177811&r2=177812&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Fri Mar 22 20:44:59 2013
@@ -1258,9 +1258,9 @@ ValueObject::GetValueAsCString (lldb::Fo
                      // put custom bytes to display in this DataExtractor to override the default value logic
                     lldb_private::DataExtractor special_format_data;
                     clang::ASTContext* ast = GetClangAST();
-                    Flags type_flags(ClangASTContext::GetTypeInfo(clang_type, ast, NULL));
                     if (format == eFormatCString)
                     {
+                        Flags type_flags(ClangASTContext::GetTypeInfo(clang_type, ast, NULL));
                         if (type_flags.Test(ClangASTContext::eTypeIsPointer) && !type_flags.Test(ClangASTContext::eTypeIsObjC))
                         {
                             // if we are dumping a pointer as a c-string, get the pointee data as a string





More information about the lldb-commits mailing list