summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py
diff options
context:
space:
mode:
authorJordan Rupprecht <rupprecht@google.com>2018-08-29 23:21:56 +0000
committerJordan Rupprecht <rupprecht@google.com>2018-08-29 23:21:56 +0000
commit7481540fd9b669299b22066916b803e7ea8466dd (patch)
treec4c33bbcbf75213e29584b2d7e211e871fb3201f /lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py
parent6edcc9ee865148b930c70e991122ef213f417c05 (diff)
downloadbcm5719-llvm-7481540fd9b669299b22066916b803e7ea8466dd.tar.gz
bcm5719-llvm-7481540fd9b669299b22066916b803e7ea8466dd.zip
[llvm-strip] Fix -p|--preserve-dates to not truncate output when used in-place.
The restoreDateOnFile() method used to preserve dates uses sys::fs::openFileForWrite(). That method defaults to opening files with CD_CreateAlways, which truncates the output file if it exists. Use CD_OpenExisting instead to open it and *not* truncate it, which also has the side benefit of erroring if the file does not exist (it should always exist, because we just wrote it out). Also, fix the test case to make sure the output is a valid output file, and not empty. The extra test assertions are enough to catch this regression. llvm-svn: 340996
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/ir-interpreter/TestIRInterpreter.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud