Skip to content
Commit d83c7402 authored by Yaxun Liu's avatar Yaxun Liu
Browse files

[OpenCL] Fix assertion due to blocks

A recent change caused assertion in CodeGenFunction::EmitBlockCallExpr when a block is called.

There is code

  Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee());
getCalleeDecl calls Expr::getReferencedDeclOfCallee, which does not handle
BlockExpr and returns nullptr, which causes isa to assert.

This patch fixes that.

Differential Revision: https://reviews.llvm.org/D58658

llvm-svn: 354893
parent 46c719dd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment