[Chapel Merge] Error when trying to rename an exported symbol wit

Branch: refs/heads/main
Revision: 1cfa339
Author: dlongnecke-cray
Log Message:

Merge pull request #17941 from dlongnecke-cray/cron-fix-hyphenated-name-future

Error when trying to rename an exported symbol with illegal characters

In #17913 I merged the interop/C/llvm and interop/C/c-backend test
directories together, and I broke the hyphenated-name future as
a result.

It recently started passing, but the header of the library it produces
is not valid C code (the exported module initializer function
contains a -).

Issue a compiler error in legalizeSymbolName when compiling a
library and an exported symbol with illegal characters cannot be
renamed.

Remove a second set of redundant calls to legalizeSymbolName
from codegen_header. The calls in uniquify_names should be
enough.

Tweak the .gitignore in interop/C to ignore the lib/* folder
while there.

Add a note to the hyphenated-name future recommending that
it be turned into a test.c test after #9594 is addressed.

See #9594 for discussion on a longterm solution to this issue.

Reviewed by @lydia-duncan. Thanks!

TESTING:

  • [x] ALL on linux64 when COMM=none
  • [x] ALL on linux64 when COMM=gasnet

Signed-off-by: David Longnecker dlongnecke-cray@users.noreply.github.com

Modified Files:
A test/interop/C/errorMessage/hyphenated-name.bad

A test/interop/C/errorMessage/hyphenated-name.chpl
A test/interop/C/errorMessage/hyphenated-name.compopts
A test/interop/C/errorMessage/hyphenated-name.future
A test/interop/C/errorMessage/hyphenated-name.good
A test/interop/C/errorMessage/hyphenated-name.noexec
R test/interop/C/hyphenated-name.chpl
R test/interop/C/hyphenated-name.cleanfiles
R test/interop/C/hyphenated-name.compopts
R test/interop/C/hyphenated-name.future
R test/interop/C/hyphenated-name.good
R test/interop/C/hyphenated-name.noexec
M compiler/codegen/codegen.cpp
M test/interop/C/.gitignore

Compare: https://github.com/chapel-lang/chapel/compare/03eba8affd54...1cfa3391261c