|
11 | 11 |
|
12 | 12 | #include "CodeGenFunction.h" |
13 | 13 |
|
14 | | -using llvm::Value; |
15 | | -using llvm::Function; |
16 | | -using llvm::AtomicOrdering; |
17 | | -using clang::SmallVector; |
18 | | -using clang::CallExpr; |
19 | | -using clang::QualType; |
20 | | -using clang::CodeGen::Address; |
21 | | -using clang::CodeGen::CodeGenFunction; |
22 | | - |
23 | 14 | // Many of MSVC builtins are on x64, ARM and AArch64; to avoid repeating code, |
24 | 15 | // we handle them here. |
25 | 16 | enum class clang::CodeGen::CodeGenFunction::MSVCIntrin { |
@@ -69,39 +60,46 @@ enum class clang::CodeGen::CodeGenFunction::MSVCIntrin { |
69 | 60 | // matching the argument type. It is assumed that only the first argument is |
70 | 61 | // overloaded. |
71 | 62 | template <unsigned N> |
72 | | -Value *emitBuiltinWithOneOverloadedType(CodeGenFunction &CGF, |
73 | | - const CallExpr *E, |
74 | | - unsigned IntrinsicID, |
75 | | - llvm::StringRef Name = "") { |
| 63 | +llvm::Value *emitBuiltinWithOneOverloadedType(clang::CodeGen::CodeGenFunction &CGF, |
| 64 | + const clang::CallExpr *E, |
| 65 | + unsigned IntrinsicID, |
| 66 | + llvm::StringRef Name = "") { |
76 | 67 | static_assert(N, "expect non-empty argument"); |
77 | | - SmallVector<Value *, N> Args; |
| 68 | + clang::SmallVector<llvm::Value *, N> Args; |
78 | 69 | for (unsigned I = 0; I < N; ++I) |
79 | 70 | Args.push_back(CGF.EmitScalarExpr(E->getArg(I))); |
80 | | - Function *F = CGF.CGM.getIntrinsic(IntrinsicID, Args[0]->getType()); |
| 71 | + llvm::Function *F = CGF.CGM.getIntrinsic(IntrinsicID, Args[0]->getType()); |
81 | 72 | return CGF.Builder.CreateCall(F, Args, Name); |
82 | 73 | } |
83 | 74 |
|
84 | | -Value *emitUnaryMaybeConstrainedFPBuiltin(CodeGenFunction &CGF, |
85 | | - const CallExpr *E, unsigned IntrinsicID, |
86 | | - unsigned ConstrainedIntrinsicID); |
| 75 | +llvm::Value *emitUnaryMaybeConstrainedFPBuiltin(clang::CodeGen::CodeGenFunction &CGF, |
| 76 | + const clang::CallExpr *E, |
| 77 | + unsigned IntrinsicID, |
| 78 | + unsigned ConstrainedIntrinsicID); |
87 | 79 |
|
88 | | -Value *EmitToInt(CodeGenFunction &CGF, llvm::Value *V, |
89 | | - QualType T, llvm::IntegerType *IntType); |
| 80 | +llvm::Value *EmitToInt(clang::CodeGen::CodeGenFunction &CGF, llvm::Value *V, |
| 81 | + clang::QualType T, llvm::IntegerType *IntType); |
90 | 82 |
|
91 | | -Value *EmitFromInt(CodeGenFunction &CGF, llvm::Value *V, |
92 | | - QualType T, llvm::Type *ResultType); |
| 83 | +llvm::Value *EmitFromInt(clang::CodeGen::CodeGenFunction &CGF, llvm::Value *V, |
| 84 | + clang::QualType T, llvm::Type *ResultType); |
93 | 85 |
|
94 | | -Address CheckAtomicAlignment(CodeGenFunction &CGF, const CallExpr *E); |
| 86 | +clang::CodeGen::Address CheckAtomicAlignment(clang::CodeGen::CodeGenFunction &CGF, |
| 87 | + const clang::CallExpr *E); |
95 | 88 |
|
96 | | -Value *MakeBinaryAtomicValue( |
97 | | - CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E, |
98 | | - AtomicOrdering Ordering = AtomicOrdering::SequentiallyConsistent); |
| 89 | +llvm::Value *MakeBinaryAtomicValue(clang::CodeGen::CodeGenFunction &CGF, |
| 90 | + llvm::AtomicRMWInst::BinOp Kind, |
| 91 | + const clang::CallExpr *E, |
| 92 | + llvm::AtomicOrdering Ordering = |
| 93 | + llvm::AtomicOrdering::SequentiallyConsistent); |
99 | 94 |
|
100 | | -Value *EmitOverflowIntrinsic(CodeGenFunction &CGF, |
101 | | - const llvm::Intrinsic::ID IntrinsicID, |
102 | | - Value *X, Value *Y, Value *&Carry); |
| 95 | +llvm::Value *EmitOverflowIntrinsic(clang::CodeGen::CodeGenFunction &CGF, |
| 96 | + const llvm::Intrinsic::ID IntrinsicID, |
| 97 | + llvm::Value *X, |
| 98 | + llvm::Value *Y, |
| 99 | + llvm::Value *&Carry); |
103 | 100 |
|
104 | | -Value *MakeAtomicCmpXchgValue(CodeGenFunction &CGF, const CallExpr *E, |
105 | | - bool ReturnBool); |
| 101 | +llvm::Value *MakeAtomicCmpXchgValue(clang::CodeGen::CodeGenFunction &CGF, |
| 102 | + const clang::CallExpr *E, |
| 103 | + bool ReturnBool); |
106 | 104 |
|
107 | 105 | #endif |
0 commit comments