[PATCH] D54055: CXXNameMangler::mangleFunctionParam: fix assertion
JF Bastien via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 13 15:12:59 PST 2018
jfb updated this revision to Diff 173945.
jfb added a comment.
Herald added subscribers: nhaehnle, jvesely.
- As discussed on the review, change the constant generation to name the synthesized constant using '__const.' + function_name + '.' variable_name. The previous code wasn't generally correct because it was trying to mangle the variable as if it were a static, and in some cases this could pull in e.g. parameter names (which is nonsensical for a static). This only occurs with a patch which I haven't submitted yet, but my change is pretty well tested already as the modified tests show.
Repository:
rC Clang
https://reviews.llvm.org/D54055
Files:
lib/CodeGen/CGDecl.cpp
test/CodeGen/decl.c
test/CodeGen/dump-struct-builtin.c
test/CodeGenCXX/amdgcn-string-literal.cpp
test/CodeGenCXX/const-init-cxx11.cpp
test/CodeGenCXX/cxx2a-init-statement.cpp
test/CodeGenCXX/float128-declarations.cpp
test/CodeGenCXX/float16-declarations.cpp
test/CodeGenOpenCL/amdgpu-nullptr.cl
test/CodeGenOpenCL/constant-addr-space-globals.cl
test/CodeGenOpenCL/partial_initializer.cl
test/CodeGenOpenCL/private-array-initialization.cl
test/Modules/templates.mm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54055.173945.patch
Type: text/x-patch
Size: 29696 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181113/bcc75ef7/attachment-0001.bin>
More information about the cfe-commits
mailing list