[PATCH] D88978: [WIP] Attach debug intrinsics to allocas, and use correct address space

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 11:56:31 PDT 2020


aprantl added inline comments.


================
Comment at: clang/lib/CodeGen/CGDecl.cpp:1579
   if (EmitDebugInfo && HaveInsertPoint()) {
-    Address DebugAddr = address;
+    Address DebugAddr = AllocaAddr.isValid() ? AllocaAddr : address;
     bool UsePointerValue = NRVO && ReturnValuePointer.isValid();
----------------
This is unintuitive — can you add a comment explaining why it may not be valid and why address should only be used then?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88978



More information about the cfe-commits mailing list