Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #32843, codegen attempting typeof(NULL) for some union tags #40365

Merged
merged 1 commit into from
Apr 11, 2021

Conversation

JeffBezanson
Copy link
Member

also fixes part of #40065

@JeffBezanson JeffBezanson added compiler:codegen Generation of LLVM IR and native code bugfix This change fixes an existing bug backport 1.6 Change should be backported to release-1.6 labels Apr 6, 2021
@KristofferC KristofferC mentioned this pull request Apr 6, 2021
33 tasks
ti->addIncoming(Constant::getNullValue(typof->getType()), entry);
ti->addIncoming(typof, nonnull);
return ti;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, we have a concise form of this function's pattern now. No need to change this, just thought I'd let you know about the alternative:

    Value *isnull = ctx.builder.CreateIsNull(v);
    return emit_guarded_test(ctx, isnull, V_rnull, [&] {
          return emit_typeof(ctx, v);
    });

@KristofferC
Copy link
Member

I merged this into #40209 with the assumption that this will be merged to master so I can run a PkgEval with this included.

@vtjnash vtjnash merged commit c3c8ffa into master Apr 11, 2021
@vtjnash vtjnash deleted the jb/fix32843 branch April 11, 2021 20:39
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label May 4, 2021
ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants