@@ -94,33 +94,15 @@ namespace llvm {
94
94
// / Create an \a temporary node and track it in \a UnresolvedNodes.
95
95
void trackIfUnresolved (MDNode *N);
96
96
97
- // / Internal helper for insertDeclare.
98
- DbgInstPtr insertDeclare (llvm::Value *Storage, DILocalVariable *VarInfo,
99
- DIExpression *Expr, const DILocation *DL,
100
- BasicBlock *InsertBB, Instruction *InsertBefore);
101
-
102
- // / Internal helper for insertLabel.
103
- DbgInstPtr insertLabel (DILabel *LabelInfo, const DILocation *DL,
104
- BasicBlock *InsertBB, Instruction *InsertBefore);
105
-
106
97
// / Internal helper. Track metadata if untracked and insert \p DVR.
107
- void insertDbgVariableRecord (DbgVariableRecord *DVR, BasicBlock *InsertBB,
108
- Instruction *InsertBefore,
109
- bool InsertAtHead = false );
98
+ void insertDbgVariableRecord (DbgVariableRecord *DVR,
99
+ InsertPosition InsertPt);
110
100
111
101
// / Internal helper with common code used by insertDbg{Value,Addr}Intrinsic.
112
102
Instruction *insertDbgIntrinsic (llvm::Function *Intrinsic, llvm::Value *Val,
113
103
DILocalVariable *VarInfo,
114
104
DIExpression *Expr, const DILocation *DL,
115
- BasicBlock *InsertBB,
116
- Instruction *InsertBefore);
117
-
118
- // / Internal helper for insertDbgValueIntrinsic.
119
- DbgInstPtr insertDbgValueIntrinsic (llvm::Value *Val,
120
- DILocalVariable *VarInfo,
121
- DIExpression *Expr, const DILocation *DL,
122
- BasicBlock *InsertBB,
123
- Instruction *InsertBefore);
105
+ InsertPosition InsertPt);
124
106
125
107
// / Internal helper for insertDbgAddrIntrinsic.
126
108
Instruction *
@@ -129,13 +111,12 @@ namespace llvm {
129
111
BasicBlock *InsertBB, Instruction *InsertBefore);
130
112
131
113
// / Internal helper for insertDef.
132
- Instruction *insertDef (DILifetime *Lifetime, llvm::Value *Referrer,
133
- const DILocation *DL, BasicBlock *InsertBB,
134
- Instruction *InsertBefore);
114
+ Instruction *insertDefImpl (DILifetime *Lifetime, llvm::Value *Referrer,
115
+ const DILocation *DL, InsertPosition InsertPt);
135
116
136
117
// / Internal helper for insertKill.
137
- Instruction *insertKill (DILifetime *Lifetime, const DILocation *DL,
138
- BasicBlock *InsertBB, Instruction *InsertBefore );
118
+ Instruction *insertKillImpl (DILifetime *Lifetime, const DILocation *DL,
119
+ InsertPosition InsertPt );
139
120
140
121
public:
141
122
// / Construct a builder for a module.
@@ -1045,46 +1026,28 @@ namespace llvm {
1045
1026
// / \param VarInfo Variable's debug info descriptor.
1046
1027
// / \param Expr A complex location expression.
1047
1028
// / \param DL Debug info location.
1048
- // / \param InsertBefore Location for the new intrinsic.
1029
+ // / \param InsertPt Location for the new intrinsic.
1049
1030
DbgInstPtr insertDeclare (llvm::Value *Storage, DILocalVariable *VarInfo,
1050
1031
DIExpression *Expr, const DILocation *DL,
1051
- Instruction *InsertBefore );
1032
+ InsertPosition InsertPt );
1052
1033
1053
1034
// / Insert a new llvm.dbg.label intrinsic call.
1054
1035
// / \param LabelInfo Label's debug info descriptor.
1055
1036
// / \param DL Debug info location.
1056
1037
// / \param InsertBefore Location for the new intrinsic.
1057
1038
DbgInstPtr insertLabel (DILabel *LabelInfo, const DILocation *DL,
1058
- Instruction *InsertBefore);
1059
-
1060
- // / Insert a new llvm.dbg.label intrinsic call.
1061
- // / \param LabelInfo Label's debug info descriptor.
1062
- // / \param DL Debug info location.
1063
- // / \param InsertAtEnd Location for the new intrinsic.
1064
- DbgInstPtr insertLabel (DILabel *LabelInfo, const DILocation *DL,
1065
- BasicBlock *InsertAtEnd);
1066
-
1067
- // / Insert a new llvm.dbg.value intrinsic call.
1068
- // / \param Val llvm::Value of the variable
1069
- // / \param VarInfo Variable's debug info descriptor.
1070
- // / \param Expr A complex location expression.
1071
- // / \param DL Debug info location.
1072
- // / \param InsertAtEnd Location for the new intrinsic.
1073
- DbgInstPtr insertDbgValueIntrinsic (llvm::Value *Val,
1074
- DILocalVariable *VarInfo,
1075
- DIExpression *Expr, const DILocation *DL,
1076
- BasicBlock *InsertAtEnd);
1039
+ InsertPosition InsertPt);
1077
1040
1078
1041
// / Insert a new llvm.dbg.value intrinsic call.
1079
1042
// / \param Val llvm::Value of the variable
1080
1043
// / \param VarInfo Variable's debug info descriptor.
1081
1044
// / \param Expr A complex location expression.
1082
1045
// / \param DL Debug info location.
1083
- // / \param InsertBefore Location for the new intrinsic.
1046
+ // / \param InsertPt Location for the new intrinsic.
1084
1047
DbgInstPtr insertDbgValueIntrinsic (llvm::Value *Val,
1085
1048
DILocalVariable *VarInfo,
1086
1049
DIExpression *Expr, const DILocation *DL,
1087
- Instruction *InsertBefore );
1050
+ InsertPosition InsertPt );
1088
1051
1089
1052
// / Replace the vtable holder in the given type.
1090
1053
// /
@@ -1163,9 +1126,9 @@ namespace llvm {
1163
1126
// / value of undef is allowed and specifies the
1164
1127
// / undefined location description.
1165
1128
// / \param DL Debug info location.
1166
- // / \param InsertBefore Location for the new intrinsic.
1129
+ // / \param InsertPt Location for the new intrinsic.
1167
1130
Instruction *insertDef (DILifetime *Lifetime, llvm::Value *Referrer,
1168
- const DILocation *DL, Instruction *InsertBefore );
1131
+ const DILocation *DL, InsertPosition InsertPt );
1169
1132
1170
1133
// / Insert a new llvm.dbg.kill intrinsic call.
1171
1134
// / \param Lifetime The end of the lifetime being killed.
@@ -1177,9 +1140,9 @@ namespace llvm {
1177
1140
// / Insert a new llvm.dbg.kill intrinsic call.
1178
1141
// / \param Lifetime The end of the lifetime being killed.
1179
1142
// / \param DL Debug info location.
1180
- // / \param InsertBefore Location for the new intrinsic.
1143
+ // / \param InsertPt Location for the new intrinsic.
1181
1144
Instruction *insertKill (DILifetime *Lifetime, const DILocation *DL,
1182
- Instruction *InsertBefore );
1145
+ InsertPosition InsertPt );
1183
1146
};
1184
1147
1185
1148
// Create wrappers for C Binding types (see CBindingWrapping.h).
0 commit comments