forked from OSchip/llvm-project
Reverting the changes to Scalar since this class needs to follow C rules for type promotion
llvm-svn: 166626
This commit is contained in:
parent
a9d4a936a8
commit
5020f958d8
|
@ -765,11 +765,11 @@ Scalar::UInt(unsigned int fail_value) const
|
|||
{
|
||||
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 @@ Scalar::ULong(unsigned long fail_value) const
|
|||
{
|
||||
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 @@ Scalar::ULongLong(unsigned long long fail_value) const
|
|||
{
|
||||
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;
|
||||
|
|
|
@ -9,7 +9,7 @@ from lldbtest import *
|
|||
|
||||
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().
|
||||
|
|
|
@ -417,8 +417,18 @@ class Base(unittest2.TestCase):
|
|||
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 @@ class Base(unittest2.TestCase):
|
|||
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 @@ class Base(unittest2.TestCase):
|
|||
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):
|
||||
|
|
Loading…
Reference in New Issue