|
11 | 11 | ///
|
12 | 12 | //===----------------------------------------------------------------------===//
|
13 | 13 |
|
14 |
| -#ifndef LLVM_LIB_ANALYSIS_OBJCARCUTIL_H |
15 |
| -#define LLVM_LIB_ANALYSIS_OBJCARCUTIL_H |
| 14 | +#ifndef LLVM_IR_OBJCARCUTIL_H |
| 15 | +#define LLVM_IR_OBJCARCUTIL_H |
16 | 16 |
|
17 | 17 | #include "llvm/IR/InstrTypes.h"
|
18 | 18 | #include "llvm/IR/LLVMContext.h"
|
19 | 19 |
|
20 | 20 | namespace llvm {
|
21 | 21 | namespace objcarc {
|
22 | 22 |
|
23 |
| -static inline const char *getRVMarkerModuleFlagStr() { |
| 23 | +inline const char *getRVMarkerModuleFlagStr() { |
24 | 24 | return "clang.arc.retainAutoreleasedReturnValueMarker";
|
25 | 25 | }
|
26 | 26 |
|
27 | 27 | enum AttachedCallOperandBundle : unsigned { RVOB_Retain, RVOB_Claim };
|
28 | 28 |
|
29 |
| -static AttachedCallOperandBundle |
| 29 | +inline AttachedCallOperandBundle |
30 | 30 | getAttachedCallOperandBundleEnum(bool IsRetain) {
|
31 | 31 | return IsRetain ? RVOB_Retain : RVOB_Claim;
|
32 | 32 | }
|
33 | 33 |
|
34 |
| -static inline bool hasAttachedCallOpBundle(const CallBase *CB, bool IsRetain) { |
| 34 | +inline bool hasAttachedCallOpBundle(const CallBase *CB, bool IsRetain) { |
35 | 35 | auto B = CB->getOperandBundle(LLVMContext::OB_clang_arc_attachedcall);
|
36 | 36 | if (!B.hasValue())
|
37 | 37 | return false;
|
38 | 38 | return cast<ConstantInt>(B->Inputs[0])->getZExtValue() ==
|
39 | 39 | getAttachedCallOperandBundleEnum(IsRetain);
|
40 | 40 | }
|
41 | 41 |
|
42 |
| -static inline bool hasAttachedCallOpBundle(const CallBase *CB) { |
| 42 | +inline bool hasAttachedCallOpBundle(const CallBase *CB) { |
43 | 43 | return CB->getOperandBundle(LLVMContext::OB_clang_arc_attachedcall)
|
44 | 44 | .hasValue();
|
45 | 45 | }
|
|
0 commit comments