yaxunl updated this revision to Diff 147914.
yaxunl edited the summary of this revision.
yaxunl added a comment.
Revised by John's comments.
https://reviews.llvm.org/D47099
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunction.h
tes
rjmccall added inline comments.
Comment at: lib/CodeGen/CGExpr.cpp:80
auto Alloca = CreateTempAlloca(Ty, Name, ArraySize);
Alloca->setAlignment(Align.getQuantity());
if (AllocaAddr)
Could you change this to call CreateTempAllocaWithoutCast?
https://rev
yaxunl updated this revision to Diff 147860.
yaxunl added a comment.
Add CreateMemTempWithoutCast and CreateTempAllocaWithoutCast by John's comments.
https://reviews.llvm.org/D47099
Files:
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CodeGenFunctio
rjmccall added a comment.
In https://reviews.llvm.org/D47099#1105574, @yaxunl wrote:
> In https://reviews.llvm.org/D47099#1105493, @rjmccall wrote:
>
> > Maybe there should just be a method that makes a primitive alloca without
> > the casting, and then you can call that in CreateTempAlloca.
>
>
yaxunl added a comment.
In https://reviews.llvm.org/D47099#1105493, @rjmccall wrote:
> Maybe there should just be a method that makes a primitive alloca without the
> casting, and then you can call that in CreateTempAlloca.
In many cases we still need to call CreateTempAlloca with cast enabled
rjmccall added a comment.
Maybe there should just be a method that makes a primitive alloca without the
casting, and then you can call that in CreateTempAlloca.
https://reviews.llvm.org/D47099
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
yaxunl created this revision.
yaxunl added a reviewer: rjmccall.
ActiveFlag is a temporary variable emitted for clean up. It is defined as
AllocaInst* type and there is
a cast to AlllocaInst in SetActiveFlag. An alloca casted to generic pointer
causes assertion in
SetActiveFlag.
Since there is