Mercurial > hg > CbC > CbC_llvm
changeset 117:facf19d07cd9
check EHStack on EmitCall (CbC goto)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 24 Aug 2016 20:10:41 +0900 |
parents | a609e5c42ecc |
children | cc378dc45926 |
files | tools/clang/lib/CodeGen/CGCall.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/clang/lib/CodeGen/CGCall.cpp Mon Aug 08 19:47:00 2016 +0900 +++ b/tools/clang/lib/CodeGen/CGCall.cpp Wed Aug 24 20:10:41 2016 +0900 @@ -3460,7 +3460,7 @@ IRCallArgs[IRFunctionArgs.getInallocaArgNo()] = Arg; } #ifndef noCbC - if (this->FnRetTy.getTypePtr()->is__CodeType()) { + if (this->FnRetTy.getTypePtr()->is__CodeType() && ! EHStack.empty() ) { EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.begin()); auto *CleanupSource = reinterpret_cast<char *>(Scope.getCleanupBuffer()); llvm::AlignedCharArray<EHScopeStack::ScopeStackAlignment, 8 * sizeof(void *)> CleanupBufferStack;