It's not necessary to call raw_ostream::close explicitly on automatic
authorDan Gohman <gohman@apple.com>
Wed, 24 Mar 2010 19:00:02 +0000 (19:00 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 24 Mar 2010 19:00:02 +0000 (19:00 +0000)
raw_ostream variables immediately before they go out of scope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99413 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-ld/llvm-ld.cpp

index 6c3953aad518543c64e4e7a5813c8d9f2b8f8cb4..c9cc17387e450b8eff33916c47f7b769ce2b83dc 100644 (file)
@@ -243,9 +243,6 @@ void GenerateBitcode(Module* M, const std::string& FileName) {
 
   // Write it out
   WriteBitcodeToFile(M, Out);
-
-  // Close the bitcode file.
-  Out.close();
 }
 
 /// GenerateAssembly - generates a native assembly language source file from the
@@ -471,7 +468,6 @@ static void EmitShellScript(char **argv, Module *M) {
       Out2 << "    -load=" << FullLibraryPath.str() << " \\\n";
   }
   Out2 << "    "  << BitcodeOutputFilename << " ${1+\"$@\"}\n";
-  Out2.close();
 }
 
 // BuildLinkItems -- This function generates a LinkItemList for the LinkItems