This is an archive of the discontinued LLVM Phabricator instance.

Use std::atomic<std::uint64_t> instead of std::atomic_uint64_t
ClosedPublic

Authored by tmsriram on Jul 15 2022, 2:01 PM.

Details

Summary

Using std::atomic_uint64_t leads to "error: no type named 'atomic_uint64_t' in namespace 'std'"

Diff Detail

Event Timeline

tmsriram created this revision.Jul 15 2022, 2:01 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
tmsriram requested review of this revision.Jul 15 2022, 2:01 PM
Amir accepted this revision.Jul 15 2022, 2:09 PM

LGTM but I'm curious which compiler produces this error

This revision is now accepted and ready to land.Jul 15 2022, 2:09 PM
MaskRay accepted this revision.Jul 15 2022, 2:12 PM

The issue may just be that <atomic> is not included. But not using these atomic aliases appears to be more common.

clang -v of the failing command:
clang -cc1 version 11.0.0 based upon LLVM 11.0.0git default target
x86_64-unknown-linux-gnu

I added #include <atomic> to bolt/include/bolt/Passes/ShrinkWrapping.h which may have fixed the issue.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2022, 4:12 PM