summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
diff options
context:
space:
mode:
authorStephane Sezer <sas@cd80.net>2016-03-24 22:22:20 +0000
committerStephane Sezer <sas@cd80.net>2016-03-24 22:22:20 +0000
commitc5273d929f54f9499d1cdea6e3112d6cdf9b18b1 (patch)
tree6849e01f27567456bd12f823ea377d5daa5be13b /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
parentce7c6cfe0e817251548a8c335ccb99bf5c0b12b4 (diff)
downloadbcm5719-llvm-c5273d929f54f9499d1cdea6e3112d6cdf9b18b1.tar.gz
bcm5719-llvm-c5273d929f54f9499d1cdea6e3112d6cdf9b18b1.zip
Make File option flags consistent for Python API
Summary: Fixes SBCommandReturnObject::SetImmediateOutputFile() and SBCommandReturnObject::SetImmediateOutputFile() for files opened with "a" or "a+" by resolving inconsistencies between File and our Python parsing of file objects. Reviewers: granata.enrico, Eugene.Zelenko, jingham, clayborg Subscribers: lldb-commits, sas Differential Revision: http://reviews.llvm.org/D18228 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 264351
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
index 10dce60cbbb..02228df5147 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
@@ -1253,10 +1253,10 @@ PythonFile::GetOptionsFromMode(llvm::StringRef mode)
return llvm::StringSwitch<uint32_t>(mode.str().c_str())
.Case("r", File::eOpenOptionRead)
.Case("w", File::eOpenOptionWrite)
- .Case("a", File::eOpenOptionAppend|File::eOpenOptionCanCreate)
+ .Case("a", File::eOpenOptionWrite|File::eOpenOptionAppend|File::eOpenOptionCanCreate)
.Case("r+", File::eOpenOptionRead|File::eOpenOptionWrite)
.Case("w+", File::eOpenOptionRead|File::eOpenOptionWrite|File::eOpenOptionCanCreate|File::eOpenOptionTruncate)
- .Case("a+", File::eOpenOptionRead|File::eOpenOptionWrite|File::eOpenOptionCanCreate)
+ .Case("a+", File::eOpenOptionRead|File::eOpenOptionWrite|File::eOpenOptionAppend|File::eOpenOptionCanCreate)
.Default(0);
}
OpenPOWER on IntegriCloud