Anastasia added inline comments.

================
Comment at: lib/CodeGen/CGDecl.cpp:1107
   assert(T.getAddressSpace() == LangAS::Default);
   if (getASTAllocaAddressSpace() != LangAS::Default) {
     auto *Addr = getTargetHooks().performAddrSpaceCast(
----------------
Is this code still needed here, considering that CreateTempAlloca is doing this 
already?


================
Comment at: lib/CodeGen/CGDecl.cpp:1109
 
-  // Alloca always returns a pointer in alloca address space, which may
-  // be different from the type defined by the language. For example,
----------------
Why removing the comment?


================
Comment at: lib/CodeGen/CodeGenFunction.h:1930
+  /// temporary variable in default address space. If \p DoCast is true,
+  /// alloca will be casted to the address space expected by the language,
+  /// otherwise it stays in the alloca address space.
----------------
I am still confused, what is the case the alloca AS is different from the 
language AS?


https://reviews.llvm.org/D33706



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

Reply via email to