diff options
Diffstat (limited to 'lib/Transforms/ObjCARC/ObjCARCContract.cpp')
-rw-r--r-- | lib/Transforms/ObjCARC/ObjCARCContract.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Transforms/ObjCARC/ObjCARCContract.cpp b/lib/Transforms/ObjCARC/ObjCARCContract.cpp index 6473d3a..2a3139f 100644 --- a/lib/Transforms/ObjCARC/ObjCARCContract.cpp +++ b/lib/Transforms/ObjCARC/ObjCARCContract.cpp @@ -35,6 +35,7 @@ #include "llvm/IR/InlineAsm.h" #include "llvm/IR/Operator.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; using namespace llvm::objcarc; @@ -134,7 +135,7 @@ bool ObjCARCContract::optimizeRetainCall(Function &F, Instruction *Retain) { // We do not have to worry about tail calls/does not throw since // retain/retainRV have the same properties. - Constant *Decl = EP.get(ARCRuntimeEntryPoints::EPT_RetainRV); + Constant *Decl = EP.get(ARCRuntimeEntryPointKind::RetainRV); cast<CallInst>(Retain)->setCalledFunction(Decl); DEBUG(dbgs() << "New: " << *Retain << "\n"); @@ -181,8 +182,8 @@ bool ObjCARCContract::contractAutorelease( " Retain: " << *Retain << "\n"); Constant *Decl = EP.get(Class == ARCInstKind::AutoreleaseRV - ? ARCRuntimeEntryPoints::EPT_RetainAutoreleaseRV - : ARCRuntimeEntryPoints::EPT_RetainAutorelease); + ? ARCRuntimeEntryPointKind::RetainAutoreleaseRV + : ARCRuntimeEntryPointKind::RetainAutorelease); Retain->setCalledFunction(Decl); DEBUG(dbgs() << " New RetainAutorelease: " << *Retain << "\n"); @@ -380,7 +381,7 @@ void ObjCARCContract::tryToContractReleaseIntoStoreStrong(Instruction *Release, Args[0] = new BitCastInst(Args[0], I8XX, "", Store); if (Args[1]->getType() != I8X) Args[1] = new BitCastInst(Args[1], I8X, "", Store); - Constant *Decl = EP.get(ARCRuntimeEntryPoints::EPT_StoreStrong); + Constant *Decl = EP.get(ARCRuntimeEntryPointKind::StoreStrong); CallInst *StoreStrong = CallInst::Create(Decl, Args, "", Store); StoreStrong->setDoesNotThrow(); StoreStrong->setDebugLoc(Store->getDebugLoc()); @@ -647,7 +648,7 @@ bool ObjCARCContract::doInitialization(Module &M) { if (!Run) return false; - EP.Initialize(&M); + EP.init(&M); // Initialize RetainRVMarker. RetainRVMarker = nullptr; |