Skip to content

[Support] Add missing LLVM_ABI annotations in Atomic.h #152768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions llvm/include/llvm/Support/Atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#ifndef LLVM_SUPPORT_ATOMIC_H
#define LLVM_SUPPORT_ATOMIC_H

#include "llvm/Support/Compiler.h"
#include "llvm/Support/DataTypes.h"

// Windows will at times define MemoryFence.
Expand All @@ -26,16 +27,15 @@

namespace llvm {
namespace sys {
void MemoryFence();
LLVM_ABI void MemoryFence();

#ifdef _MSC_VER
typedef long cas_flag;
typedef long cas_flag;
#else
typedef uint32_t cas_flag;
typedef uint32_t cas_flag;
#endif
cas_flag CompareAndSwap(volatile cas_flag* ptr,
cas_flag new_value,
cas_flag old_value);
LLVM_ABI cas_flag CompareAndSwap(volatile cas_flag *ptr, cas_flag new_value,
cas_flag old_value);
}
}

Expand Down