[PATCH] D143981: [Support/BLAKE3] Rename blake3_* -> llvm_blake3_* to avoid symbol collisions

Jeremy Maitin-Shepard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 00:12:16 PST 2023


jbms added a comment.

In D143981#4125191 <https://reviews.llvm.org/D143981#4125191>, @akyrtzi wrote:

> `.s` files can use the preprocessor as well. I'd recommend to add a file that do the renames using `#define`, like in `blake3_impl.h`, and include it in all the `.s` files.
> That way the changes to the original files is minimized, which is useful for pulling in future changes from the original repo.

The MSVC ".asm" files aren't preprocessed, though.  Given that, it may be simpler to just use a `sed` script to apply the renames to all the assembly files when importing (which is what I used to generate the patch in the first place):

  sed -i -e 's/\b\(_\?\)blake3_/\1llvm_blake3_/g' *.S *.asm


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143981/new/

https://reviews.llvm.org/D143981



More information about the llvm-commits mailing list