mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-29 16:12:44 +00:00
Make sure to close the file before deleting it
llvm-svn: 3905
This commit is contained in:
parent
4e11d9e5de
commit
2ccb52142f
@ -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