[PATCH] D29671: [DebugInfo] Add address space when creating DIDerivedTypes

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 14:32:06 PST 2017


kzhuravl added inline comments.


================
Comment at: include/clang/Basic/TargetInfo.h:1043
+  virtual Optional<unsigned> getDWARFAddressSpace(unsigned AddressSpace) const {
+    return None;
+  }
----------------
dblaikie wrote:
> Is this a reasonable default implementation? Should there be a default or should any implementation (mabe only those with non-zero address spaces?) be expected to provide a mapping? (not sure how this looks for other things in TargetInfo)
I think the proposed hook is flexible (targets can map address spaces however they like) and returning None is a reasonable default (dwarf spec does not say that DW_AT_address_class is required - returning None here, will cause AsmPrinter not to generate DW_AT_address_class).


https://reviews.llvm.org/D29671





More information about the llvm-commits mailing list