diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-18 04:43:47 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-18 04:43:47 +0000 |
commit | 44edda0af7b7aa18da51eea47f978bb1db88e462 (patch) | |
tree | d73b52b2619372980170b33411861260216971a0 /lldb/source/Interpreter/OptionGroupOutputFile.cpp | |
parent | cb97c48243d600e29889be85bdd61ce24999f041 (diff) | |
download | llvm-44edda0af7b7aa18da51eea47f978bb1db88e462.zip llvm-44edda0af7b7aa18da51eea47f978bb1db88e462.tar.gz llvm-44edda0af7b7aa18da51eea47f978bb1db88e462.tar.bz2 |
create constants for multichar constants
Multichar constants are not portable as the byte order is undefined. Use a
constant value instead. This avoids a warning when compiling with gcc 4.8+
(-Wmultichar) and makes the code more portable.
llvm-svn: 204110
Diffstat (limited to 'lldb/source/Interpreter/OptionGroupOutputFile.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionGroupOutputFile.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/OptionGroupOutputFile.cpp b/lldb/source/Interpreter/OptionGroupOutputFile.cpp index 3bb8ab3..59bd82e 100644 --- a/lldb/source/Interpreter/OptionGroupOutputFile.cpp +++ b/lldb/source/Interpreter/OptionGroupOutputFile.cpp @@ -28,11 +28,15 @@ OptionGroupOutputFile::~OptionGroupOutputFile () { } +static const uint32_t SHORT_OPTION_APND = 0x61706e64; // 'apnd' + static OptionDefinition g_option_table[] = { { LLDB_OPT_SET_1 , false, "outfile", 'o', OptionParser::eRequiredArgument, NULL, 0, eArgTypeFilename , "Specify a path for capturing command output."}, - { LLDB_OPT_SET_1 , false, "append-outfile" , 'apnd', OptionParser::eNoArgument, NULL, 0, eArgTypeNone , "Append to the the file specified with '--outfile <path>'."}, + { LLDB_OPT_SET_1 , false, "append-outfile" , SHORT_OPTION_APND, + OptionParser::eNoArgument, NULL, 0, eArgTypeNone , + "Append to the the file specified with '--outfile <path>'."}, }; uint32_t @@ -61,7 +65,7 @@ OptionGroupOutputFile::SetOptionValue (CommandInterpreter &interpreter, error = m_file.SetValueFromCString (option_arg); break; - case 'apnd': + case SHORT_OPTION_APND: m_append.SetCurrentValue(true); break; |