From c73c7cb2a335b0cc0c5f28f45a49c8be623d848e Mon Sep 17 00:00:00 2001 From: Book-reader Date: Wed, 14 Jan 2026 11:00:01 +1300 Subject: [PATCH] add Win32_CODEPAGES enum and enable utf8 console output on win32 (#2670) * add Win32_CODEPAGES enum and enable utf8 console output on win32 --------- Co-authored-by: Christoffer Lerno --- lib/std/core/private/main_stub.c3 | 35 +++- lib/std/os/win32/console.c3 | 160 ++++++++++++++++++ releasenotes.md | 5 +- src/main.c | 8 + .../concurrency/atomic_load_store_debug.c3t | 2 +- test/test_suite/debug_symbols/defer_macro.c3t | 10 +- 6 files changed, 210 insertions(+), 10 deletions(-) create mode 100644 lib/std/os/win32/console.c3 diff --git a/lib/std/core/private/main_stub.c3 b/lib/std/core/private/main_stub.c3 index 52f2e4a8b..00a32fbe3 100644 --- a/lib/std/core/private/main_stub.c3 +++ b/lib/std/core/private/main_stub.c3 @@ -12,7 +12,10 @@ macro int @main_to_err_main(#m, int, char**) if (catch #m()) return 1; return 0; } -macro int @main_to_int_main(#m, int, char**) => #m(); +macro int @main_to_int_main(#m, int, char**) +{ + return #m(); +} macro int @main_to_void_main(#m, int, char**) { #m(); @@ -63,6 +66,17 @@ macro int @main_to_void_main_args(#m, int argc, char** argv) } module std::core::main_stub @if(env::WIN32); +import std::os::win32; + +macro win32_set_utf8_codepage() @local +{ + // By default windows uses an OEM codepage that differs based on locale + // and does not support printing utf-8 characters. This allows both + // printing utf-8 characters from strings and reading them from stdin. + win32::setConsoleCP(UTF8); + win32::setConsoleOutputCP(UTF8); +} + extern fn Char16** _win_command_line_to_argv_w(ushort* cmd_line, int* argc_ptr) @cname("CommandLineToArgvW"); @@ -93,18 +107,26 @@ macro void release_wargs(String[] list) @private macro int @win_to_err_main_noargs(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); if (catch #m()) return 1; return 0; } -macro int @win_to_int_main_noargs(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) => #m(); +macro int @win_to_int_main_noargs(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) +{ + win32_set_utf8_codepage(); + return #m(); +} + macro int @win_to_void_main_noargs(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); #m(); return 0; } macro int @win_to_err_main_args(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); String[] args = win_command_line_to_strings(cmd_line); defer release_wargs(args); if (catch #m(args)) return 1; @@ -113,6 +135,7 @@ macro int @win_to_err_main_args(#m, void* handle, void* prev_handle, Char16* cmd macro int @win_to_int_main_args(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); String[] args = win_command_line_to_strings(cmd_line); defer release_wargs(args); return #m(args); @@ -120,6 +143,7 @@ macro int @win_to_int_main_args(#m, void* handle, void* prev_handle, Char16* cmd macro int @win_to_void_main_args(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); String[] args = win_command_line_to_strings(cmd_line); defer release_wargs(args); #m(args); @@ -128,6 +152,7 @@ macro int @win_to_void_main_args(#m, void* handle, void* prev_handle, Char16* cm macro int @win_to_err_main(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); String[] args = win_command_line_to_strings(cmd_line); defer release_wargs(args); if (catch #m(handle, prev_handle, args, show_cmd)) return 1; @@ -136,6 +161,7 @@ macro int @win_to_err_main(#m, void* handle, void* prev_handle, Char16* cmd_line macro int @win_to_int_main(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); String[] args = win_command_line_to_strings(cmd_line); defer release_wargs(args); return #m(handle, prev_handle, args, show_cmd); @@ -143,6 +169,7 @@ macro int @win_to_int_main(#m, void* handle, void* prev_handle, Char16* cmd_line macro int @win_to_void_main(#m, void* handle, void* prev_handle, Char16* cmd_line, int show_cmd) { + win32_set_utf8_codepage(); String[] args = win_command_line_to_strings(cmd_line); defer release_wargs(args); #m(handle, prev_handle, args, show_cmd); @@ -151,6 +178,7 @@ macro int @win_to_void_main(#m, void* handle, void* prev_handle, Char16* cmd_lin macro int @wmain_to_err_main_args(#m, int argc, Char16** argv) { + win32_set_utf8_codepage(); String[] args = wargs_strings(argc, argv); defer release_wargs(args); if (catch #m(args)) return 1; @@ -159,6 +187,7 @@ macro int @wmain_to_err_main_args(#m, int argc, Char16** argv) macro int @wmain_to_int_main_args(#m, int argc, Char16** argv) { + win32_set_utf8_codepage(); String[] args = wargs_strings(argc, argv); defer release_wargs(args); return #m(args); @@ -166,6 +195,7 @@ macro int @wmain_to_int_main_args(#m, int argc, Char16** argv) macro int @_wmain_runner(#m, int argc, Char16** argv) { + win32_set_utf8_codepage(); String[] args = wargs_strings(argc, argv); defer release_wargs(args); return #m(args) ? 0 : 1; @@ -173,6 +203,7 @@ macro int @_wmain_runner(#m, int argc, Char16** argv) macro int @wmain_to_void_main_args(#m, int argc, Char16** argv) { + win32_set_utf8_codepage(); String[] args = wargs_strings(argc, argv); defer release_wargs(args); #m(args); diff --git a/lib/std/os/win32/console.c3 b/lib/std/os/win32/console.c3 new file mode 100644 index 000000000..8f4507038 --- /dev/null +++ b/lib/std/os/win32/console.c3 @@ -0,0 +1,160 @@ +module std::os::win32 @if(env::WIN32); + +enum Win32_CODEPAGE : const Win32_UINT +{ + IBM037 = 037, // IBM EBCDIC US-Canada + IBM437 = 437, // OEM United States + IBM500 = 500, // IBM EBCDIC International + ASMO_708 = 708, // Arabic (ASMO 708) + CODEPAGE_709 = 709, // Arabic (ASMO-449+, BCON V4) + CODEPAGE_710 = 710, // Arabic - Transparent Arabic + DOS_720 = 720, // Arabic (Transparent ASMO); Arabic (DOS) + IBM737 = 737, // OEM Greek (formerly 437G); Greek (DOS) + IBM775 = 775, // OEM Baltic; Baltic (DOS) + IBM850 = 850, // OEM Multilingual Latin 1; Western European (DOS) + IBM852 = 852, // OEM Latin 2; Central European (DOS) + IBM855 = 855, // OEM Cyrillic (primarily Russian) + IBM857 = 857, // OEM Turkish; Turkish (DOS) + IBM00858 = 858, // OEM Multilingual Latin 1 + Euro symbol + IBM860 = 860, // OEM Portuguese; Portuguese (DOS) + IBM861 = 861, // OEM Icelandic; Icelandic (DOS) + DOS_862 = 862, // OEM Hebrew; Hebrew (DOS) + IBM863 = 863, // OEM French Canadian; French Canadian (DOS) + IBM864 = 864, // OEM Arabic; Arabic (864) + IBM865 = 865, // OEM Nordic; Nordic (DOS) + CP866 = 866, // OEM Russian; Cyrillic (DOS) + IBM869 = 869, // OEM Modern Greek; Greek, Modern (DOS) + IBM870 = 870, // IBM EBCDIC Multilingual/ROECE (Latin 2); IBM EBCDIC Multilingual Latin 2 + WINDOWS_874 = 874, // Thai (Windows) + CP875 = 875, // IBM EBCDIC Greek Modern + SHIFT_JIS = 932, // ANSI/OEM Japanese; Japanese (Shift-JIS) + GB2312 = 936, // ANSI/OEM Simplified Chinese (PRC, Singapore); Chinese Simplified (GB2312) + KS_C_5601_1987 = 949, // ANSI/OEM Korean (Unified Hangul Code) + BIG5 = 950, // ANSI/OEM Traditional Chinese (Taiwan; Hong Kong SAR, PRC); Chinese Traditional (Big5) + IBM1026 = 1026, // IBM EBCDIC Turkish (Latin 5) + IBM01047 = 1047, // IBM EBCDIC Latin 1/Open System + IBM01140 = 1140, // IBM EBCDIC US-Canada (037 + Euro symbol); IBM EBCDIC (US-Canada-Euro) + IBM01141 = 1141, // IBM EBCDIC Germany (20273 + Euro symbol); IBM EBCDIC (Germany-Euro) + IBM01142 = 1142, // IBM EBCDIC Denmark-Norway (20277 + Euro symbol); IBM EBCDIC (Denmark-Norway-Euro) + IBM01143 = 1143, // IBM EBCDIC Finland-Sweden (20278 + Euro symbol); IBM EBCDIC (Finland-Sweden-Euro) + IBM01144 = 1144, // IBM EBCDIC Italy (20280 + Euro symbol); IBM EBCDIC (Italy-Euro) + IBM01145 = 1145, // IBM EBCDIC Latin America-Spain (20284 + Euro symbol); IBM EBCDIC (Spain-Euro) + IBM01146 = 1146, // IBM EBCDIC United Kingdom (20285 + Euro symbol); IBM EBCDIC (UK-Euro) + IBM01147 = 1147, // IBM EBCDIC France (20297 + Euro symbol); IBM EBCDIC (France-Euro) + IBM01148 = 1148, // IBM EBCDIC International (500 + Euro symbol); IBM EBCDIC (International-Euro) + IBM01149 = 1149, // IBM EBCDIC Icelandic (20871 + Euro symbol); IBM EBCDIC (Icelandic-Euro) + UTF16 = 1200, // Unicode UTF-16, little endian byte order (BMP of ISO 10646); available only to managed applications + UNICODE_FFFE = 1201, // Unicode UTF-16, big endian byte order; available only to managed applications + WINDOWS_1250 = 1250, // ANSI Central European; Central European (Windows) + WINDOWS_1251 = 1251, // ANSI Cyrillic; Cyrillic (Windows) + WINDOWS_1252 = 1252, // ANSI Latin 1; Western European (Windows) + WINDOWS_1253 = 1253, // ANSI Greek; Greek (Windows) + WINDOWS_1254 = 1254, // ANSI Turkish; Turkish (Windows) + WINDOWS_1255 = 1255, // ANSI Hebrew; Hebrew (Windows) + WINDOWS_1256 = 1256, // ANSI Arabic; Arabic (Windows) + WINDOWS_1257 = 1257, // ANSI Baltic; Baltic (Windows) + WINDOWS_1258 = 1258, // ANSI/OEM Vietnamese; Vietnamese (Windows) + JOHAB = 1361, // Korean (Johab) + MACINTOSH = 10000, // MAC Roman; Western European (Mac) + X_MAC_JAPANESE = 10001, // Japanese (Mac) + X_MAC_CHINESETRAD = 10002, // MAC Traditional Chinese (Big5); Chinese Traditional (Mac) + X_MAC_KOREAN = 10003, // Korean (Mac) + X_MAC_ARABIC = 10004, // Arabic (Mac) + X_MAC_HEBREW = 10005, // Hebrew (Mac) + X_MAC_GREEK = 10006, // Greek (Mac) + X_MAC_CYRILLIC = 10007, // Cyrillic (Mac) + X_MAC_CHINESESIMP = 10008, // MAC Simplified Chinese (GB 2312); Chinese Simplified (Mac) + X_MAC_ROMANIAN = 10010, // Romanian (Mac) + X_MAC_UKRANIAN = 10017, // Ukrainian (Mac) + X_MAC_THAI = 10021, // Thai (Mac) + X_MAC_CE = 10029, // MAC Latin 2; Central European (Mac) + X_MAC_ICELANDIC = 10079, // Icelandic (Mac) + X_MAC_TURKISH = 10081, // Turkish (Mac) + X_MAC_CROATIAN = 10082, // Croatian (Mac) + UTF32 = 12000, // Unicode UTF-32, little endian byte order; available only to managed applications + UTF32BE = 12001, // Unicode UTF-32, big endian byte order; available only to managed applications + X_CHINESE_CNS = 20000, // CNS Taiwan; Chinese Traditional (CNS) + X_CP_20001 = 20001, // TCA Taiwan + X_CHINESE_ETEN = 20002, // Eten Taiwan; Chinese Traditional (Eten) + X_CP_20003 = 20003, // IBM5550 Taiwan + X_CP_20004 = 20004, // TeleText Taiwan + X_CP_20005 = 20005, // Wang Taiwan + X_IA5 = 20105, // IA5 (IRV International Alphabet No. 5, 7-bit); Western European (IA5) + X_IA5_GERMAN = 20106, // IA5 German (7-bit) + X_IA5_SWEDISH = 20107, // IA5 Swedish (7-bit) + X_IA5_NORWEGIAN = 20108, // IA5 Norwegian (7-bit) + US_ASCII = 20127, // US-ASCII (7-bit) + X_CP20261 = 20261, // T.61 + X_CP20269 = 20269, // ISO 6937 Non-Spacing Accent + IBM273 = 20273, // IBM EBCDIC Germany + IBM277 = 20277, // IBM EBCDIC Denmark-Norway + IBM278 = 20278, // IBM EBCDIC Finland-Sweden + IBM280 = 20280, // IBM EBCDIC Italy + IBM284 = 20284, // IBM EBCDIC Latin America-Spain + IBM285 = 20285, // IBM EBCDIC United Kingdom + IBM290 = 20290, // IBM EBCDIC Japanese Katakana Extended + IBM297 = 20297, // IBM EBCDIC France + IBM420 = 20420, // IBM EBCDIC Arabic + IBM423 = 20423, // IBM EBCDIC Greek + IBM424 = 20424, // IBM EBCDIC Hebrew + X_EBCDIC_KOREAN_EXTENDED = 20833, // IBM EBCDIC Korean Extended + IBM_THAI = 20838, // IBM EBCDIC Thai + KOI8_R = 20866, // Russian (KOI8-R); Cyrillic (KOI8-R) + IBM871 = 20871, // IBM EBCDIC Icelandic + IBM880 = 20880, // IBM EBCDIC Cyrillic Russian + IBM905 = 20905, // IBM EBCDIC Turkish + IBM00924 = 20924, // IBM EBCDIC Latin 1/Open System (1047 + Euro symbol) + EUC_JP = 20932, // Japanese (JIS 0208-1990 and 0212-1990) + X_CP20936 = 20936, // Simplified Chinese (GB2312); Chinese Simplified (GB2312-80) + X_CP20949 = 20949, // Korean Wansung + CP1025 = 21025, // IBM EBCDIC Cyrillic Serbian-Bulgarian + CODEPAGE_21027 = 21027, // (deprecated) + KOI8_U = 21866, // Ukrainian (KOI8-U); Cyrillic (KOI8-U) + ISO_8859_1 = 28591, // ISO 8859-1 Latin 1; Western European (ISO) + ISO_8859_2 = 28592, // ISO 8859-2 Central European; Central European (ISO) + ISO_8859_3 = 28593, // ISO 8859-3 Latin 3 + ISO_8859_4 = 28594, // ISO 8859-4 Baltic + ISO_8859_5 = 28595, // ISO 8859-5 Cyrillic + ISO_8859_6 = 28596, // ISO 8859-6 Arabic + ISO_8859_7 = 28597, // ISO 8859-7 Greek + ISO_8859_8 = 28598, // ISO 8859-8 Hebrew; Hebrew (ISO-Visual) + ISO_8859_9 = 28599, // ISO 8859-9 Turkish + ISO_8859_13 = 28603, // ISO 8859-13 Estonian + ISO_8859_15 = 28605, // ISO 8859-15 Latin 9 + X_EUROPA = 29001, // Europa 3 + ISO_8859_8_I = 38598, // ISO 8859-8 Hebrew; Hebrew (ISO-Logical) + ISO_2022_JP = 50220, // ISO 2022 Japanese with no halfwidth Katakana; Japanese (JIS) + CS_ISO2022JP = 50221, // ISO 2022 Japanese with halfwidth Katakana; Japanese (JIS-Allow 1 byte Kana) + ISO_2022_JP2 = 50222, // ISO 2022 Japanese JIS X 0201-1989; Japanese (JIS-Allow 1 byte Kana - SO/SI) + ISO_2022_KR = 50225, // ISO 2022 Korean + X_CP50227 = 50227, // ISO 2022 Simplified Chinese; Chinese Simplified (ISO 2022) + CODEPAGE_50229 = 50229, // ISO 2022 Traditional Chinese + CODEPAGE_50930 = 50930, // EBCDIC Japanese (Katakana) Extended + CODEPAGE_50931 = 50931, // EBCDIC US-Canada and Japanese + CODEPAGE_50933 = 50933, // EBCDIC Korean Extended and Korean + CODEPAGE_50935 = 50935, // EBCDIC Simplified Chinese Extended and Simplified Chinese + CODEPAGE_50936 = 50936, // EBCDIC Simplified Chinese + CODEPAGE_50937 = 50937, // EBCDIC US-Canada and Traditional Chinese + CODEPAGE_50939 = 50939, // EBCDIC Japanese (Latin) Extended and Japanese + EUC_JP2 = 51932, // EUC Japanese + EUC_CN = 51936, // EUC Simplified Chinese; Chinese Simplified (EUC) + EUC_KR = 51949, // EUC Korean + CODEPAGE_51950 = 51950, // EUC Traditional Chinese + HZ_GB_2312 = 52936, // HZ-GB2312 Simplified Chinese; Chinese Simplified (HZ) + GB18030 = 54936, // Windows XP and later: GB18030 Simplified Chinese (4 byte); Chinese Simplified (GB18030) + X_ISCII_DE = 57002, // ISCII Devanagari + X_ISCII_BE = 57003, // ISCII Bangla + X_ISCII_TA = 57004, // ISCII Tamil + X_ISCII_TE = 57005, // ISCII Telugu + X_ISCII_AS = 57006, // ISCII Assamese + X_ISCII_OR = 57007, // ISCII Odia + X_ISCII_KA = 57008, // ISCII Kannada + X_ISCII_MA = 57009, // ISCII Malayalam + X_ISCII_GU = 57010, // ISCII Gujarati + X_ISCII_PA = 57011, // ISCII Punjabi + UTF7 = 65000, // Unicode (UTF-7) + UTF8 = 65001, // Unicode (UTF-8) +} + +extern fn Win32_BOOL setConsoleOutputCP(Win32_CODEPAGE wCodePageId) @cname("SetConsoleOutputCP"); +extern fn Win32_BOOL setConsoleCP(Win32_CODEPAGE wCodePageId) @cname("SetConsoleCP"); diff --git a/releasenotes.md b/releasenotes.md index e3d184924..17aab02ec 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -13,6 +13,7 @@ - Better error messages when slicing a pointer to a slice or vector. #2681 - Generics using `@generic` rather than module based. - Reduced memory usage for backtraces on Linux. +- On win32 utf-8 console output is now enabled by default in compiled programs ### Fixes - Regression with npot vector in struct triggering an assert #2219. @@ -32,7 +33,7 @@ - Fix error message when a method has the wrong type for the first argument. - Unit tests allocating too much `tmem` without `@pool` would cause errors in unrelated tests. #2654 - Incorrect rounding for decimals in formatter in some cases. #2657 -- Incorrectly using LLVMStructType when emitting dynamic functions on MachO #2666 +- Incorrectly using LLVMStructType when emitting dynamic functions on MachO #2666 - FixedThreadPool join did not work correctly. - Fix bug when creating bool vectors in certain cases. - Compiler assert when passing returning CT failure immediately rethrown #2689. @@ -63,7 +64,7 @@ - Return of Mutex `unlock()` and `lock()` is now "@maydiscard" and should be ignored. They will return void in 0.8.0. - Return of ConditionVariable `signal()` `broadcast()` and `wait()` are now "@maydiscard". They will return void in 0.8.0. - Return of Thread `detatch()` is now "@maydiscard". It will return void in 0.8.0. -- Buffered/UnbufferedChannel, and both ThreadPools have `@maydiscard` on a set of functions. They will retunr void in 0.8.0. +- Buffered/UnbufferedChannel, and both ThreadPools have `@maydiscard` on a set of functions. They will return void in 0.8.0. - Pthread bindings correctly return Errno instead of CInt. - Return of Thread `join()` is now "@maydiscard". - Add `poly1305` one-time Message Authentication Code and associated tests. #2639 diff --git a/src/main.c b/src/main.c index b56ead3d9..0f221915a 100644 --- a/src/main.c +++ b/src/main.c @@ -7,6 +7,9 @@ #ifdef __OpenBSD__ #include #endif +#if PLATFORM_WINDOWS +#include +#endif bool debug_log = false; @@ -36,6 +39,11 @@ int main_real(int argc, const char *argv[]) getrlimit(RLIMIT_DATA, &l); l.rlim_cur = l.rlim_max; setrlimit(RLIMIT_DATA, &l); +#endif +#if PLATFORM_WINDOWS + // Set the console input and output codepage to utf8 to handle utf8 text correctly + SetConsoleCP(CP_UTF8); + SetConsoleOutputCP(CP_UTF8); #endif bench_begin(); diff --git a/test/test_suite/concurrency/atomic_load_store_debug.c3t b/test/test_suite/concurrency/atomic_load_store_debug.c3t index cd5274afd..c4ddf4cf1 100644 --- a/test/test_suite/concurrency/atomic_load_store_debug.c3t +++ b/test/test_suite/concurrency/atomic_load_store_debug.c3t @@ -130,6 +130,6 @@ declare i1 @llvm.expect.i1(i1, i1) !46 = !DILocation(line: 10, column: 9, scope: !39) !47 = !DILocalVariable(name: ".anon", arg: 2, scope: !39, file: !7, line: 10, type: !42) !48 = !DILocation( -!49 = distinct !DISubprogram(name: "@main_to_void_main", linkageName: "@main_to_void_main", scope: !50, file: !50, line: 16, scopeLine: 16, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !6) +!49 = distinct !DISubprogram(name: "@main_to_void_main", linkageName: "@main_to_void_main", scope: !50, file: !50 !50 = !DIFile(filename: "main_stub.c3", directory: !51 = !DILocation( diff --git a/test/test_suite/debug_symbols/defer_macro.c3t b/test/test_suite/debug_symbols/defer_macro.c3t index 2350b2b15..538d469d4 100644 --- a/test/test_suite/debug_symbols/defer_macro.c3t +++ b/test/test_suite/debug_symbols/defer_macro.c3t @@ -670,7 +670,7 @@ no_match: ; preds = %compare !55 = !DIDerivedType(tag: DW_TAG_member, name: "asdf", scope: !53, file: !7, line: 30, baseType: !14, size: 64, align: 64) !56 = !DILocation(line: 19, column: 7, scope: !32) !57 = !DILocation(line: 19, column: 25, scope: !32) -!58 = !DILocation +!58 = !DILocation(line: 35, column: 70, scope: !59, inlinedAt: !60) !59 = distinct !DISubprogram(name: "[DEFAULT INIT]", linkageName: "[DEFAULT INIT]", scope: !7, file: !7, line: 35, scopeLine: 35, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !6) !60 = !DILocation(line: 19, column: 14, scope: !32) !61 = !DILocation(line: 22, column: 7, scope: !32) @@ -751,14 +751,14 @@ no_match: ; preds = %compare !136 = !DISubroutineType(types: !137) !137 = !{!15, !15, !138} !138 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !43, size: 64, align: 64, dwarfAddressSpace: 0) -!139 = !DILocalVariable(name: ".anon", arg: 1, scope: !135, file: !7, line: 15, type: !15) +!139 = !DILocalVariable(name: ".anon", arg: 1, scope: !135, file: !7 !140 = !DILocation(line: 15, column: 8, scope: !135) -!141 = !DILocalVariable(name: ".anon", arg: 2, scope: !135, file: !7, line: 15, type: !138) -!142 = !DILocalVariable(name: "list", scope: !143, file: !7, line: 45, type: !35, align: 64) +!141 = !DILocalVariable(name: ".anon", arg: 2, scope: !135, file: !7 +!142 = !DILocalVariable(name: "list", scope: !143, file: !7 !143 = distinct !DISubprogram(name: "@main_to_int_main_args", linkageName: "@main_to_int_main_args", scope: !144, file: !144 !144 = !DIFile(filename: "main_stub.c3" !145 = !DILocation -!146 = !DILocalVariable(name: "list", scope: !147, file: !7, line: 24, type: !35, align: 64) +!146 = !DILocalVariable(name: "list", scope: !147, file: !7 !147 = distinct !DISubprogram(name: "args_to_strings" !148 = !DILocation !149 = !DILocation