JOE1994 added inline comments.

================
Comment at: clang/lib/CodeGen/CGClass.cpp:1000
+      SrcPtr = SrcPtr.withElementType(CGF.Int8Ty);
       CGF.Builder.CreateMemCpy(DestPtr, SrcPtr, Size.getQuantity());
     }
----------------
barannikov88 wrote:
> Just something to think about.
> CreateMemCpy, CreateStore (but not CreateLoad) and probably some other 
> methods ignore the element type. I don't know what should we do: drop 
> unnecessary calls to `withElementType` or add asserts to Create* methods that 
> the element type is expected. Otherwise it is just dead code.
> 
I see. I'm inclined to drop the unnecessary calls to `withElementType`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154229

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to