[PATCH] D80044: AllocaInst should store Align instead of MaybeAlign.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 16 14:49:48 PDT 2020


efriedma marked an inline comment as done.
efriedma added inline comments.


================
Comment at: llvm/lib/AsmParser/LLParser.cpp:7071
+  SmallPtrSet<Type *, 4> Visited;
+  if (!Alignment && !Ty->isSized(&Visited))
     return Error(ExplicitTypeLoc, "loading unsized types is not allowed");
----------------
jdoerfert wrote:
> efriedma wrote:
> > I guess it's worth briefly noting what this is about: if isSized is passed a SmallPtrSet, it uses that set to catch infinitely recursive types (for example, a struct that has itself as a member).  Otherwise, it just crashes on such types.
> > 
> > An existing test for alloca caught this, so while I was here I extended the same check to load/store.
> LGTM for committing this separately. I guess it would be perfect if you could add a test as well.
Pushed 0ec5f501 with testcases.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80044/new/

https://reviews.llvm.org/D80044





More information about the llvm-commits mailing list