[PATCH] D45445: [CodeGen/AccelTable] Add the "sizetype" synthetic type to the accelerator table

Jonas Devlieghere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 02:24:10 PDT 2018


JDevlieghere added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1407
   IndexTyDie = &createAndAddDIE(dwarf::DW_TAG_base_type, getUnitDie());
-  addString(*IndexTyDie, dwarf::DW_AT_name, "sizetype");
+  StringRef Name = "sizetype";
+  addString(*IndexTyDie, dwarf::DW_AT_name, Name);
----------------
labath wrote:
> Another interesting question is whether we shouldn't rename this to something more unique (`_Sizetype` ?). As it stands now, if a user has his own `sizetype` defined, lldb will get confused and will not be able to differentiate the two. Gcc emits this type as "unsigned long", but doing that is a bit trickier for us as we don't want to assume a particular front-end here.
Let's use a double underscore then as that's reserved for the compilers internal use. I think both GCC and LLVM define the macro `__SIZE_TYPE__`, but I don't know if it's worth to repurpose that for this.


Repository:
  rL LLVM

https://reviews.llvm.org/D45445





More information about the llvm-commits mailing list