mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 17:11:44 +03:00
fix building against LLVM master. Patch by @rainers
This commit is contained in:
parent
aff480bafa
commit
7e5a88ceeb
1 changed files with 6 additions and 1 deletions
|
@ -40,7 +40,12 @@ void emitCoverageLinecountInc(Loc &loc) {
|
||||||
|
|
||||||
// Do an atomic increment, so this works when multiple threads are executed.
|
// Do an atomic increment, so this works when multiple threads are executed.
|
||||||
gIR->ir->CreateAtomicRMW(llvm::AtomicRMWInst::Add, ptr, DtoConstUint(1),
|
gIR->ir->CreateAtomicRMW(llvm::AtomicRMWInst::Add, ptr, DtoConstUint(1),
|
||||||
llvm::Monotonic);
|
#if LDC_LLVM_VER >= 309
|
||||||
|
llvm::AtomicOrdering::Monotonic
|
||||||
|
#else
|
||||||
|
llvm::Monotonic
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
unsigned num_sizet_bits = gDataLayout->getTypeSizeInBits(DtoSize_t());
|
unsigned num_sizet_bits = gDataLayout->getTypeSizeInBits(DtoSize_t());
|
||||||
unsigned idx = line / num_sizet_bits;
|
unsigned idx = line / num_sizet_bits;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue