[llvm] r178385 - Run the ObjCARCContract pass for LTO. <rdar://problem/13538084>
Bob Wilson
bob.wilson at apple.com
Fri Mar 29 16:28:55 PDT 2013
Author: bwilson
Date: Fri Mar 29 18:28:55 2013
New Revision: 178385
URL: http://llvm.org/viewvc/llvm-project?rev=178385&view=rev
Log:
Run the ObjCARCContract pass for LTO. <rdar://problem/13538084>
Modified:
llvm/trunk/tools/lto/LTOCodeGenerator.cpp
Modified: llvm/trunk/tools/lto/LTOCodeGenerator.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lto/LTOCodeGenerator.cpp?rev=178385&r1=178384&r2=178385&view=diff
==============================================================================
--- llvm/trunk/tools/lto/LTOCodeGenerator.cpp (original)
+++ llvm/trunk/tools/lto/LTOCodeGenerator.cpp Fri Mar 29 18:28:55 2013
@@ -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::generateObjectFil
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";
More information about the llvm-commits
mailing list