|
14 | 14 |
|
15 | 15 | #include "llvm/IR/IRBuilder.h" |
16 | 16 | #include "llvm/IR/PassManager.h" |
| 17 | +#include "llvm/Support/Compiler.h" |
17 | 18 | #include "llvm/Transforms/Coroutines/CoroInstr.h" |
18 | 19 |
|
19 | 20 | namespace llvm { |
@@ -78,18 +79,20 @@ struct Shape { |
78 | 79 | } |
79 | 80 |
|
80 | 81 | // Scan the function and collect the above intrinsics for later processing |
81 | | - void analyze(Function &F, SmallVectorImpl<CoroFrameInst *> &CoroFrames, |
82 | | - SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves, |
83 | | - CoroPromiseInst *&CoroPromise); |
| 82 | + LLVM_ABI void analyze(Function &F, |
| 83 | + SmallVectorImpl<CoroFrameInst *> &CoroFrames, |
| 84 | + SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves, |
| 85 | + CoroPromiseInst *&CoroPromise); |
84 | 86 | // If for some reason, we were not able to find coro.begin, bailout. |
85 | | - void invalidateCoroutine(Function &F, |
86 | | - SmallVectorImpl<CoroFrameInst *> &CoroFrames); |
| 87 | + LLVM_ABI void |
| 88 | + invalidateCoroutine(Function &F, |
| 89 | + SmallVectorImpl<CoroFrameInst *> &CoroFrames); |
87 | 90 | // Perform ABI related initial transformation |
88 | | - void initABI(); |
| 91 | + LLVM_ABI void initABI(); |
89 | 92 | // Remove orphaned and unnecessary intrinsics |
90 | | - void cleanCoroutine(SmallVectorImpl<CoroFrameInst *> &CoroFrames, |
91 | | - SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves, |
92 | | - CoroPromiseInst *CoroPromise); |
| 93 | + LLVM_ABI void cleanCoroutine(SmallVectorImpl<CoroFrameInst *> &CoroFrames, |
| 94 | + SmallVectorImpl<CoroSaveInst *> &UnusedCoroSaves, |
| 95 | + CoroPromiseInst *CoroPromise); |
93 | 96 |
|
94 | 97 | // Field indexes for special fields in the switch lowering. |
95 | 98 | struct SwitchFieldIndex { |
@@ -256,12 +259,14 @@ struct Shape { |
256 | 259 | /// Allocate memory according to the rules of the active lowering. |
257 | 260 | /// |
258 | 261 | /// \param CG - if non-null, will be updated for the new call |
259 | | - Value *emitAlloc(IRBuilder<> &Builder, Value *Size, CallGraph *CG) const; |
| 262 | + LLVM_ABI Value *emitAlloc(IRBuilder<> &Builder, Value *Size, |
| 263 | + CallGraph *CG) const; |
260 | 264 |
|
261 | 265 | /// Deallocate memory according to the rules of the active lowering. |
262 | 266 | /// |
263 | 267 | /// \param CG - if non-null, will be updated for the new call |
264 | | - void emitDealloc(IRBuilder<> &Builder, Value *Ptr, CallGraph *CG) const; |
| 268 | + LLVM_ABI void emitDealloc(IRBuilder<> &Builder, Value *Ptr, |
| 269 | + CallGraph *CG) const; |
265 | 270 |
|
266 | 271 | Shape() = default; |
267 | 272 | explicit Shape(Function &F) { |
|
0 commit comments