Fix libLTO:
authorNick Lewycky <nicholas@mxc.ca>
Sun, 26 Jul 2009 22:16:39 +0000 (22:16 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Sun, 26 Jul 2009 22:16:39 +0000 (22:16 +0000)
commitfd6a2498ab081a838354ecde07b540b9d071abc8
treeb2cd9db2f46a063b162dbee8c533087ec2caf3fe
parentbcd92f1bc45dd6579a126e55c8c6f92e055c4826
Fix libLTO:
 * Call InitializeAllTargets on every path where we might query the
   TargetRegistry. This fixes PR4604.
 * flush the formatted_raw_ostream& or else not all of the assembly will make
   it to the .s file. (It doesn't do this in its destructor?!)
 * Due to a reversed conditional, libLTO was reporting many symbols as both
   defined and undefined, including two definitions of the same symbol name
   in its symbol list.

llvm-svn: 77170
llvm/tools/lto/LTOCodeGenerator.cpp
llvm/tools/lto/LTOModule.cpp