This is an archive of the discontinued LLVM Phabricator instance.

Enable fexec-charset option
Needs ReviewPublic

Authored by abhina.sreeskantharajan on Jun 21 2023, 6:22 AM.

Details

Summary

This patch enables the fexec-charset option to control the execution charset of string literals. It sets the default internal charset, system charset, and execution charset for z/OS and UTF-8 for all other platforms.
This patch depends on adding the CharSetConverter class https://reviews.llvm.org/D153417

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 21 2023, 6:22 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
abhina.sreeskantharajan requested review of this revision.Jun 21 2023, 6:22 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 21 2023, 6:22 AM
efriedma added inline comments.
clang/lib/Driver/ToolChains/Clang.cpp
6864

The default should be in the "else"? It's confusing to pass two -fexec-charset arguments, even if it works.

clang/lib/Lex/LiteralSupport.cpp
2145

Can the code be refactored to put this repeated sequence into a helper function?