[PATCH] Change in symbol renaming to help demanglers and debugger. clang part.

Sunil Srivastava Sunil_Srivastava at playstation.sony.com
Mon May 4 12:05:36 PDT 2015


This is the second half of http://reviews.llvm.org/D9481, for tools/clang.

Renaming of local symbols, to make unique names, used to just append a number. That creates trouble for demanglers by making these names un-demangle-able. So, for example, '_ZL3ByePi' becomes '_ZL3ByePi1', which is not acceptable to the demangler.

In similar situations Gcc prepends a dot before the number, and existing demanglers already know to stop at a dot. This change in ValueSymbolTable.cpp does the same for llvm.

The code change should not cause any difference in generated code, because these are all local symbols.

However, there are several cases (60) in the regression test that fail with the extra dot because the IR dumps are being checked for the old style renaming. That requires tweaks to these tests, about half in llvm and the rest in tools/clang.

http://reviews.llvm.org/D9483

Files:
  test/CodeGen/2009-01-05-BlockInlining.c
  test/CodeGen/blocksignature.c
  test/CodeGen/captured-statements.c
  test/CodeGen/cfstring.c
  test/CodeGen/darwin-string-literals.c
  test/CodeGen/mangle-blocks.c
  test/CodeGen/ppc-varargs-struct.c
  test/CodeGen/pr3518.c
  test/CodeGenCXX/2011-12-19-init-list-ctor.cpp
  test/CodeGenCXX/captured-statements.cpp
  test/CodeGenCXX/compound-literals.cpp
  test/CodeGenCXX/ctor-dtor-alias.cpp
  test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
  test/CodeGenCXX/debug-info-globalinit.cpp
  test/CodeGenCXX/mangle-lambdas.cpp
  test/CodeGenCXX/microsoft-abi-static-initializers.cpp
  test/CodeGenCXX/pragma-init_seg.cpp
  test/CodeGenCXX/static-data-member.cpp
  test/CodeGenObjC/arc-ivar-layout.m
  test/CodeGenObjC/arc-loadweakretained-release.m
  test/CodeGenObjC/category-super-class-meth.m
  test/CodeGenObjC/encode-test.m
  test/CodeGenObjC/forward-protocol-metadata-symbols.m
  test/CodeGenObjC/ivar-layout-array0-struct.m
  test/CodeGenObjC/ivar-layout-no-optimize.m
  test/CodeGenObjC/local-static-block.m
  test/CodeGenObjC/mangle-blocks.m
  test/CodeGenObjC/metadata-symbols-64.m
  test/CodeGenObjC/ns-constant-strings.m
  test/CodeGenObjC/objc-container-subscripting-1.m
  test/CodeGenObjC/property-type-mismatch.m
  test/CodeGenObjCXX/arc-globals.mm
  test/CodeGenObjCXX/property-lvalue-capture.mm
  test/Profile/Inputs/c-captured.proftext
  test/Profile/c-captured.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9483.24903.patch
Type: text/x-patch
Size: 39422 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150504/cf4cbce7/attachment.bin>


More information about the cfe-commits mailing list