[all-commits] [llvm/llvm-project] 7ab6bc: [ThinLTO] Preserve Unicode characters in module pa...

Ben Dunbobbin via All-commits all-commits at lists.llvm.org
Wed Apr 29 01:12:04 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ab6bc066cbb09ee9eebb60577317966eef6e796
      https://github.com/llvm/llvm-project/commit/7ab6bc066cbb09ee9eebb60577317966eef6e796
  Author: Ben Dunbobbin <Ben.Dunbobbin at sony.com>
  Date:   2026-04-29 (Wed, 29 Apr 2026)

  Changed paths:
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    A llvm/test/Bitcode/thinlto-unicode-module-paths.test

  Log Message:
  -----------
  [ThinLTO] Preserve Unicode characters in module paths when writing the combined-index (#194320)

`IndexBitcodeWriter::writeModStrings()` serializes module path strings
into a `SmallVector<unsigned>` before emitting `MST_CODE_ENTRY` records.
When a path contains UTF-8 bytes with the high bit set, appending from
`StringRef::begin()/end()` can be incorrect. Instead, append the module
path through `bytes_begin()/bytes_end()`, so the bitcode writer always
serializes unsigned bytes.

Fixes: https://github.com/llvm/llvm-project/issues/194318 (#194318)

Based on work by @kbelochapka and @romanova-ekaterina.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list