diff options
| author | Reid Kleckner <reid@kleckner.net> | 2015-07-07 22:26:07 +0000 |
|---|---|---|
| committer | Reid Kleckner <reid@kleckner.net> | 2015-07-07 22:26:07 +0000 |
| commit | 98cb8ba64cd6c225f767d79d670341e341c819db (patch) | |
| tree | f88d1633de9d283aca2d9bcd70b39eff0c6ad896 /clang/lib/CodeGen | |
| parent | 60381791b50c82eb03eb3aae26c6dc3d52794c20 (diff) | |
| download | bcm5719-llvm-98cb8ba64cd6c225f767d79d670341e341c819db.tar.gz bcm5719-llvm-98cb8ba64cd6c225f767d79d670341e341c819db.zip | |
Update clang for intrinsic rename of framerecover to localrecover
llvm-svn: 241634
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 14 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index d6913156794..6e2fe871112 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -1396,13 +1396,13 @@ llvm::Value *CodeGenFunction::recoverAddrOfEscapedLocal( CGBuilderTy Builder(AllocaInsertPt); if (auto *ParentAlloca = dyn_cast<llvm::AllocaInst>(ParentVar)) { // Mark the variable escaped if nobody else referenced it and compute the - // frameescape index. + // localescape index. auto InsertPair = ParentCGF.EscapedLocals.insert( std::make_pair(ParentAlloca, ParentCGF.EscapedLocals.size())); int FrameEscapeIdx = InsertPair.first->second; - // call i8* @llvm.framerecover(i8* bitcast(@parentFn), i8* %fp, i32 N) + // call i8* @llvm.localrecover(i8* bitcast(@parentFn), i8* %fp, i32 N) llvm::Function *FrameRecoverFn = llvm::Intrinsic::getDeclaration( - &CGM.getModule(), llvm::Intrinsic::framerecover); + &CGM.getModule(), llvm::Intrinsic::localrecover); llvm::Constant *ParentI8Fn = llvm::ConstantExpr::getBitCast(ParentCGF.CurFn, Int8PtrTy); RecoverCall = Builder.CreateCall( @@ -1411,12 +1411,12 @@ llvm::Value *CodeGenFunction::recoverAddrOfEscapedLocal( } else { // If the parent didn't have an alloca, we're doing some nested outlining. - // Just clone the existing framerecover call, but tweak the FP argument to + // Just clone the existing localrecover call, but tweak the FP argument to // use our FP value. All other arguments are constants. auto *ParentRecover = cast<llvm::IntrinsicInst>(ParentVar->stripPointerCasts()); - assert(ParentRecover->getIntrinsicID() == llvm::Intrinsic::framerecover && - "expected alloca or framerecover in parent LocalDeclMap"); + assert(ParentRecover->getIntrinsicID() == llvm::Intrinsic::localrecover && + "expected alloca or localrecover in parent LocalDeclMap"); RecoverCall = cast<llvm::CallInst>(ParentRecover->clone()); RecoverCall->setArgOperand(1, ParentFP); RecoverCall->insertBefore(AllocaInsertPt); @@ -1468,7 +1468,7 @@ void CodeGenFunction::EmitCapturedLocals(CodeGenFunction &ParentCGF, ParentFP = AI; } - // Create llvm.framerecover calls for all captures. + // Create llvm.localrecover calls for all captures. for (const VarDecl *VD : Finder.Captures) { if (isa<ImplicitParamDecl>(VD)) { CGM.ErrorUnsupported(VD, "'this' captured by SEH"); diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index c4288dd21a5..ec3c75ccd25 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -284,7 +284,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { Builder.ClearInsertionPoint(); } - // If some of our locals escaped, insert a call to llvm.frameescape in the + // If some of our locals escaped, insert a call to llvm.localescape in the // entry block. if (!EscapedLocals.empty()) { // Invert the map from local to index into a simple vector. There should be @@ -294,7 +294,7 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) { for (auto &Pair : EscapedLocals) EscapeArgs[Pair.second] = Pair.first; llvm::Function *FrameEscapeFn = llvm::Intrinsic::getDeclaration( - &CGM.getModule(), llvm::Intrinsic::frameescape); + &CGM.getModule(), llvm::Intrinsic::localescape); CGBuilderTy(AllocaInsertPt).CreateCall(FrameEscapeFn, EscapeArgs); } diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 478948b1a17..58bec1c2482 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -888,7 +888,7 @@ private: DeclMapTy LocalDeclMap; /// Track escaped local variables with auto storage. Used during SEH - /// outlining to produce a call to llvm.frameescape. + /// outlining to produce a call to llvm.localescape. llvm::DenseMap<llvm::AllocaInst *, int> EscapedLocals; /// LabelMap - This keeps track of the LLVM basic block for each C label. @@ -2068,13 +2068,13 @@ public: /// Scan the outlined statement for captures from the parent function. For /// each capture, mark the capture as escaped and emit a call to - /// llvm.framerecover. Insert the framerecover result into the LocalDeclMap. + /// llvm.localrecover. Insert the localrecover result into the LocalDeclMap. void EmitCapturedLocals(CodeGenFunction &ParentCGF, const Stmt *OutlinedStmt, bool IsFilter); /// Recovers the address of a local in a parent function. ParentVar is the /// address of the variable used in the immediate parent function. It can - /// either be an alloca or a call to llvm.framerecover if there are nested + /// either be an alloca or a call to llvm.localrecover if there are nested /// outlined functions. ParentFP is the frame pointer of the outermost parent /// frame. llvm::Value *recoverAddrOfEscapedLocal(CodeGenFunction &ParentCGF, |

