[PATCH] D77248: [llvm][IR] Add dso_local_equivalent Constant

Leonard Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 12:05:45 PST 2020


leonardchan added a comment.

Welp, it turns out that if I went with the approach of adding the constant manually everywhere the macro was used, I'd be adding a lot of special cases everywhere. The only case I needed to cover was in Core which depends on `Value.def`:

  /usr/local/google/home/leonardchan/llvm-monorepo/llvm-project-1/llvm/lib/IR/Core.cpp:832:12: note: expanded from macro 'HANDLE_VALUE'
      return LLVM##Name##ValueKind;
             ^
  <scratch space>:239:1: note: expanded from here
  LLVMDSOLocalEquivalentValueKind

The only way I could think of preventing the constant from being used here while still being used in other places `HANDLE_VALUE/CONSTANT` are used is a "banlist" approach via more macros in `Value.def`. Open to other ideas if it doesn't look that good.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77248



More information about the llvm-commits mailing list