Add DidCallStackSave variable to CodeGenFunction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64156 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anders Carlsson 2009-02-09 20:20:56 +00:00
Родитель fdf556936f
Коммит 4cc1a47033
2 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -144,6 +144,7 @@ void CodeGenFunction::StartFunction(const Decl *D, QualType RetTy,
llvm::Function *Fn,
const FunctionArgList &Args,
SourceLocation StartLoc) {
DidCallStackSave = false;
CurFuncDecl = D;
FnRetTy = RetTy;
CurFn = Fn;

Просмотреть файл

@ -260,6 +260,10 @@ private:
/// which the stack depth changes.
llvm::Value *StackDepth;
/// DidCallStackSave - Whether llvm.stacksave has been called. Used to avoid
/// calling llvm.stacksave for multiple VLAs in the same scope.
bool DidCallStackSave;
/// StackSaveValues - A stack(!) of stack save values. When a new scope is
/// entered, a null is pushed on this stack. If a VLA is emitted, then the
/// return value of llvm.stacksave() is stored at the top of this stack.