mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 07:34:06 +00:00
Make sure to close the file before deleting it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3905 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3abb95df01
commit
93c26685bf
@ -115,7 +115,10 @@ int main(int argc, char **argv) {
|
||||
|
||||
Passes.run(*M.get());
|
||||
|
||||
if (Out != &std::cout) delete Out;
|
||||
if (Out != &std::cout) {
|
||||
((std::ofstream*)Out)->close();
|
||||
delete Out;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,10 @@ int main(int argc, char **argv) {
|
||||
|
||||
Passes.run(*M.get());
|
||||
|
||||
if (Out != &std::cout) delete Out;
|
||||
if (Out != &std::cout) {
|
||||
((std::ofstream*)Out)->close();
|
||||
delete Out;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,10 @@ int main(int argc, char **argv) {
|
||||
|
||||
Passes.run(*M.get());
|
||||
|
||||
if (Out != &std::cout) delete Out;
|
||||
if (Out != &std::cout) {
|
||||
((std::ofstream*)Out)->close();
|
||||
delete Out;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user