<rdar://problem/10546739>

Fixed SBValue::GetValueAsUnsigned() and SBValue::GetValueAsSigned() calls to
work for bitfields.

llvm-svn: 147332
diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp
index e1c25be..23d22d1 100644
--- a/lldb/source/Core/ValueObject.cpp
+++ b/lldb/source/Core/ValueObject.cpp
@@ -359,10 +359,15 @@
             exe_scope->CalculateExecutionContext(exe_ctx);
         Value tmp_value(m_value);
         scalar = tmp_value.ResolveValue(&exe_ctx, GetClangAST ());
-        return scalar.IsValid();
+        if (scalar.IsValid())
+        {
+            const uint32_t bitfield_bit_size = GetBitfieldBitSize();
+            if (bitfield_bit_size)
+                return scalar.ExtractBitfield (bitfield_bit_size, GetBitfieldBitOffset());
+            return true;
+        }
     }
-    else
-        return false;
+    return false;
 }
 
 bool