Index: include/lld/Core/Simple.h =================================================================== --- include/lld/Core/Simple.h +++ include/lld/Core/Simple.h @@ -174,7 +174,7 @@ class SimpleDefinedAtom : public DefinedAtom { public: explicit SimpleDefinedAtom(const File &f) : _file(f) { - static uint32_t lastOrdinal = 0; + static std::atomic lastOrdinal; _ordinal = lastOrdinal++; _references.setAllocator(&f.allocator()); }