Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm][ADT] Fix Any linker error with multiple compilers
Citing the comment in the source: Define the type id and initialize with a non-zero value. Initializing with a zero value means the variab can end up in either the .data or the .bss section. This can lead to multiple definition linker errors when some object files are compiled with a compiler that puts the variable into .data but they are linked to object files from a different compiler that put the variable into .bss. To prevent this issue from happening, initialize the variable with a non-zero value, which forces it to land in .data (because .bss is zero-initialized). Fixes #62270 A regression of D139974. Differential Revision: https://reviews.llvm.org/D148953
- Loading branch information