[Lldb-commits] [lldb] r121048 - in /lldb/trunk/source: Expression/IRForTarget.cpp Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Symbol/ClangASTType.cpp

Sean Callanan scallanan at apple.com
Mon Dec 6 14:16:55 PST 2010


Author: spyffe
Date: Mon Dec  6 16:16:55 2010
New Revision: 121048

URL: http://llvm.org/viewvc/llvm-project?rev=121048&view=rev
Log:
Fixed a bug in which the SEL type was being resolved
wrongly as the target of a pointer rather than the
SEL pointer itself.  This caused incorrect behavior
when dealing with Objective-C selector variables.

Modified:
    lldb/trunk/source/Expression/IRForTarget.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Symbol/ClangASTType.cpp

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=121048&r1=121047&r2=121048&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Mon Dec  6 16:16:55 2010
@@ -846,7 +846,7 @@
     lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
     
     if (log)
-        log->Printf("MaybeHandleVariable (%s)\n", PrintValue(llvm_value_ptr).c_str());
+        log->Printf("MaybeHandleVariable (%s)", PrintValue(llvm_value_ptr).c_str());
 
     if (ConstantExpr *constant_expr = dyn_cast<ConstantExpr>(llvm_value_ptr))
     {

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=121048&r1=121047&r2=121048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Dec  6 16:16:55 2010
@@ -2933,7 +2933,7 @@
                         }
                         else if (type_name_const_str == g_objc_type_name_selector)
                         {
-                            clang_type = ast.GetBuiltInType_objc_selector();
+                            clang_type = ast.CreatePointerType(ast.GetBuiltInType_objc_selector());
                             resolve_state = Type::eResolveStateFull;
                         }
                     }

Modified: lldb/trunk/source/Symbol/ClangASTType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTType.cpp?rev=121048&r1=121047&r2=121048&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTType.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTType.cpp Mon Dec  6 16:16:55 2010
@@ -160,6 +160,9 @@
         case clang::BuiltinType::Float:
         case clang::BuiltinType::Double:
         case clang::BuiltinType::LongDouble:    return lldb::eEncodingIEEE754;
+        
+        case clang::BuiltinType::ObjCId:
+        case clang::BuiltinType::ObjCSel:       return lldb::eEncodingUint;
 
         case clang::BuiltinType::NullPtr:       return lldb::eEncodingUint;
         }





More information about the lldb-commits mailing list