[Lldb-commits] [lldb] r166626 - in /lldb/trunk: source/Core/Scalar.cpp test/expression_command/call-function/TestCallStdStringFunction.py test/lldbtest.py

Enrico Granata egranata at apple.com
Wed Oct 24 14:42:49 PDT 2012


Author: enrico
Date: Wed Oct 24 16:42:49 2012
New Revision: 166626

URL: http://llvm.org/viewvc/llvm-project?rev=166626&view=rev
Log:
Reverting the changes to Scalar since this class needs to follow C rules for type promotion

Modified:
    lldb/trunk/source/Core/Scalar.cpp
    lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py
    lldb/trunk/test/lldbtest.py

Modified: lldb/trunk/source/Core/Scalar.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Scalar.cpp?rev=166626&r1=166625&r2=166626&view=diff
==============================================================================
--- lldb/trunk/source/Core/Scalar.cpp (original)
+++ lldb/trunk/source/Core/Scalar.cpp Wed Oct 24 16:42:49 2012
@@ -765,11 +765,11 @@
     {
     default:
     case e_void:        break;
-    case e_sint:         
+    case e_sint:        return (unsigned int)m_data.sint;
     case e_uint:        return (unsigned int)m_data.uint;
-    case e_slong:        
+    case e_slong:       return (unsigned int)m_data.slong;
     case e_ulong:       return (unsigned int)m_data.ulong;
-    case e_slonglong:    
+    case e_slonglong:   return (unsigned int)m_data.slonglong;
     case e_ulonglong:   return (unsigned int)m_data.ulonglong;
     case e_float:       return (unsigned int)m_data.flt;
     case e_double:      return (unsigned int)m_data.dbl;
@@ -808,11 +808,11 @@
     {
     default:
     case e_void:        break;
-    case e_sint:         
+    case e_sint:        return (unsigned long)m_data.sint;
     case e_uint:        return (unsigned long)m_data.uint;
-    case e_slong:        
+    case e_slong:       return (unsigned long)m_data.slong;
     case e_ulong:       return (unsigned long)m_data.ulong;
-    case e_slonglong:    
+    case e_slonglong:   return (unsigned long)m_data.slonglong;
     case e_ulonglong:   return (unsigned long)m_data.ulonglong;
     case e_float:       return (unsigned long)m_data.flt;
     case e_double:      return (unsigned long)m_data.dbl;
@@ -902,11 +902,11 @@
     {
     default:
     case e_void:        break;
-    case e_sint:        
+    case e_sint:        return (unsigned long long)m_data.sint;
     case e_uint:        return (unsigned long long)m_data.uint;
-    case e_slong:       
+    case e_slong:       return (unsigned long long)m_data.slong;
     case e_ulong:       return (unsigned long long)m_data.ulong;
-    case e_slonglong:   
+    case e_slonglong:   return (unsigned long long)m_data.slonglong;
     case e_ulonglong:   return (unsigned long long)m_data.ulonglong;
     case e_float:       return (unsigned long long)m_data.flt;
     case e_double:      return (unsigned long long)m_data.dbl;

Modified: lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py?rev=166626&r1=166625&r2=166626&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py (original)
+++ lldb/trunk/test/expression_command/call-function/TestCallStdStringFunction.py Wed Oct 24 16:42:49 2012
@@ -9,7 +9,7 @@
 
 class ExprCommandCallFunctionTestCase(TestBase):
 
-    mydir = os.path.join("expression_command", "call-function")
+    mydir = os.path.join("expressioa_command", "call-function")
 
     def setUp(self):
         # Call super's setUp().

Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=166626&r1=166625&r2=166626&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Wed Oct 24 16:42:49 2012
@@ -417,8 +417,18 @@
     accomplish things.
     
     """
-    # The concrete subclass should override this attribute.
-    mydir = None
+    mydir_ = None
+
+    @classmethod
+    def mydir_get(cls):
+        return cls.mydir_
+
+    @classmethod
+    def mydir_set(cls,val):
+        print "mydir_set"
+        cls.mydir_ = val
+
+    Base.mydir = property(mydir_get,mydir_set)
 
     # Keep track of the old current working directory.
     oldcwd = None
@@ -438,10 +448,6 @@
         if not cls.mydir or len(cls.mydir) == 0:
             raise Exception("Subclasses must override the 'mydir' attribute.")
 
-        # Fail fast if 'mydir' is not an existing directory
-        if not os.path.exists(cls.mydir) or not os.path.isdir(cls.mydir):
-            raise Exception("Subclasses must define 'mydir' to be an existing directory.")
-
         # Save old working directory.
         cls.oldcwd = os.getcwd()
 
@@ -451,6 +457,7 @@
             if traceAlways:
                 print >> sys.stderr, "Change dir to:", os.path.join(os.environ["LLDB_TEST"], cls.mydir)
             os.chdir(os.path.join(os.environ["LLDB_TEST"], cls.mydir))
+            print "I chdired"
 
     @classmethod
     def tearDownClass(cls):





More information about the lldb-commits mailing list