[PATCH] D48117: [Sparc] Get sret arg size from CallLoweringInfo.getArgs()

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 13 14:14:07 PDT 2018


jyknight added a comment.

Nice simplification.



================
Comment at: lib/Target/Sparc/SparcISelLowering.cpp:828
       hasStructRetAttr = true;
+      PointerType *Ty = dyn_cast<PointerType>(CLI.getArgs()[i].Ty);
+      Type *ElementTy = Ty->getElementType();
----------------
Please change this to cast instead of dyn_cast, since we can't handle a NULL return value anyhow.

I suspect this probably should be getArgs()[Outs[realArgIdx].OrigArgIndex] instead of [i]?


Repository:
  rL LLVM

https://reviews.llvm.org/D48117





More information about the llvm-commits mailing list