1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Run the ObjCARCContract pass for LTO. <rdar://problem/13538084>

llvm-svn: 178385
This commit is contained in:
Bob Wilson 2013-03-29 23:28:55 +00:00
parent 1bc2d353ed
commit 7e366d2845

View File

@ -44,6 +44,7 @@
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/IPO/PassManagerBuilder.h"
#include "llvm/Transforms/ObjCARC.h"
using namespace llvm;
static cl::opt<bool>
@ -397,6 +398,10 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out,
formatted_raw_ostream Out(out);
// If the bitcode files contain ARC code and were compiled with optimization,
// the ObjCARCContractPass must be run, so do it unconditionally here.
codeGenPasses.add(createObjCARCContractPass());
if (_target->addPassesToEmitFile(codeGenPasses, Out,
TargetMachine::CGFT_ObjectFile)) {
errMsg = "target file type not supported";