llvm-mc: Delete output files on error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98445 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar 2010-03-13 19:31:47 +00:00
parent 96e2cec9c7
commit 4ca906560a

View File

@ -311,6 +311,10 @@ static int AssembleInput(const char *ProgName) {
if (Out != &fouts())
delete Out;
// Delete output on errors.
if (Res && OutputFilename != "-")
sys::Path(OutputFilename).eraseFromDisk();
return Res;
}