[PATCH] D32248: CodeGen: Cast alloca to expected address space

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 16 12:17:08 PDT 2017


rjmccall added inline comments.


================
Comment at: lib/CodeGen/TargetInfo.cpp:411
+    CodeGen::CodeGenFunction &CGF, llvm::Value *Src, unsigned SrcAddr,
+    unsigned DestAddr, llvm::Type *DestTy, bool isNonNull) const {
   // Since target may map different address spaces in AST to the same address
----------------
Anastasia wrote:
> Seems like some parameters are unused.
This is just the default implementation.  The idea is that targets that need to do something more complex on a particular conversion — e.g. to make sure that null pointers are translated correctly when they have different bit-patterns — can easily do so.


https://reviews.llvm.org/D32248





More information about the cfe-commits mailing list