We were getting an assert because somebody was making a watchpoint that was
neither read nor write.  Tighten up the checking so this isn't possible.

<rdar://problem/14111167>

llvm-svn: 184245
diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp
index 2f350ee..bed490a 100644
--- a/lldb/source/Commands/CommandObjectWatchpoint.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp
@@ -1066,6 +1066,7 @@
 
         // Now it's time to create the watchpoint.
         uint32_t watch_type = m_option_watchpoint.watch_type;
+        
         error.Clear();
         Watchpoint *wp = target->CreateWatchpoint(addr, size, &type, watch_type, error).get();
         if (wp)
@@ -1221,16 +1222,13 @@
         // If no argument is present, issue an error message.  There's no way to set a watchpoint.
         if (command.GetArgumentCount() == 0)
         {
-            result.GetErrorStream().Printf("error: required argument missing; specify an expression to evaulate into the addres to watch for\n");
+            result.GetErrorStream().Printf("error: required argument missing; specify an expression to evaulate into the address to watch for\n");
             result.SetStatus(eReturnStatusFailed);
             return false;
         }
 
-        bool with_dash_w = m_option_watchpoint.watch_type_specified;
-        bool with_dash_x = (m_option_watchpoint.watch_size != 0);
-
         // If no '-w' is specified, default to '-w write'.
-        if (!with_dash_w)
+        if (!m_option_watchpoint.watch_type_specified)
         {
             m_option_watchpoint.watch_type = OptionGroupWatchpoint::eWatchWrite;
         }
@@ -1271,8 +1269,11 @@
             result.SetStatus(eReturnStatusFailed);
             return false;
         }
-        size = with_dash_x ? m_option_watchpoint.watch_size
-                           : target->GetArchitecture().GetAddressByteSize();
+        
+        if (m_option_watchpoint.watch_size != 0)
+            size = m_option_watchpoint.watch_size;
+        else
+            size = target->GetArchitecture().GetAddressByteSize();
 
         // Now it's time to create the watchpoint.
         uint32_t watch_type = m_option_watchpoint.watch_type;