[PATCH] D153318: [llvm] Refactor BalancedPartitioning for fixing build failure with MSVC

kamlesh kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 18:25:57 PDT 2023


kamleshbhalui added a comment.

In D153318#4436431 <https://reviews.llvm.org/D153318#4436431>, @ellis wrote:

> In D153318#4436375 <https://reviews.llvm.org/D153318#4436375>, @kamleshbhalui wrote:
>
>> ThreadPool.h ends up including immintrin.h from MSVC after builtin generation in clang and It has definitions for replacing one builtins with another.
>> Clang maintain a enum for all generated builtin but due to above macro replacement enum ends up having two element with same name and it causes multiple definitions error.
>> There are some other instances where ThreadPool.h is not included directly(i.e. Debuginfod.h).
>
> I'm not understanding why this change fixes that since we are still including `ThreadPool.h` in `BalancedPartitioning.cpp`. This seems like something that should be fixed in `ThreadPool.h` itself.

Including ThreadPool.h in BalancedPartitioning.cpp is not an issue, issue comes when we include it in BalancedPartitioning.h.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153318



More information about the llvm-commits mailing list