mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-14 06:37:33 +00:00
Run the ObjCARCContract pass for LTO. <rdar://problem/13538084>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2030d5f3e9
commit
d696544eac
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user