• Home
  • Raw
  • Download

Lines Matching refs:Cst

220 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M);
222 static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant() argument
223 LLVMValueRef Ret = clone_constant_impl(Cst, M); in clone_constant()
224 check_value_kind(Ret, LLVMGetValueKind(Cst)); in clone_constant()
228 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant_impl() argument
229 if (!LLVMIsAConstant(Cst)) in clone_constant_impl()
233 if (LLVMIsAGlobalValue(Cst)) { in clone_constant_impl()
234 const char *Name = LLVMGetValueName(Cst); in clone_constant_impl()
237 if (LLVMIsAFunction(Cst)) { in clone_constant_impl()
238 check_value_kind(Cst, LLVMFunctionValueKind); in clone_constant_impl()
246 if (LLVMIsAGlobalVariable(Cst)) { in clone_constant_impl()
247 check_value_kind(Cst, LLVMGlobalVariableValueKind); in clone_constant_impl()
259 if (LLVMIsAConstantInt(Cst)) { in clone_constant_impl()
260 check_value_kind(Cst, LLVMConstantIntValueKind); in clone_constant_impl()
261 return LLVMConstInt(TypeCloner(M).Clone(Cst), in clone_constant_impl()
262 LLVMConstIntGetZExtValue(Cst), false); in clone_constant_impl()
266 if (LLVMIsAConstantAggregateZero(Cst)) { in clone_constant_impl()
267 check_value_kind(Cst, LLVMConstantAggregateZeroValueKind); in clone_constant_impl()
268 return LLVMConstNull(TypeCloner(M).Clone(Cst)); in clone_constant_impl()
272 if (LLVMIsAConstantArray(Cst)) { in clone_constant_impl()
273 check_value_kind(Cst, LLVMConstantArrayValueKind); in clone_constant_impl()
274 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
278 Elts.push_back(clone_constant(LLVMGetOperand(Cst, i), M)); in clone_constant_impl()
283 if (LLVMIsAConstantDataArray(Cst)) { in clone_constant_impl()
284 check_value_kind(Cst, LLVMConstantDataArrayValueKind); in clone_constant_impl()
285 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
289 Elts.push_back(clone_constant(LLVMGetElementAsConstant(Cst, i), M)); in clone_constant_impl()
294 if (LLVMIsAConstantStruct(Cst)) { in clone_constant_impl()
295 check_value_kind(Cst, LLVMConstantStructValueKind); in clone_constant_impl()
296 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
300 Elts.push_back(clone_constant(LLVMGetOperand(Cst, i), M)); in clone_constant_impl()
308 if (LLVMIsUndef(Cst)) { in clone_constant_impl()
309 check_value_kind(Cst, LLVMUndefValueValueKind); in clone_constant_impl()
310 return LLVMGetUndef(TypeCloner(M).Clone(Cst)); in clone_constant_impl()
314 if (LLVMIsAConstantFP(Cst)) { in clone_constant_impl()
315 check_value_kind(Cst, LLVMConstantFPValueKind); in clone_constant_impl()
320 if (!LLVMIsAConstantExpr(Cst)) in clone_constant_impl()
324 check_value_kind(Cst, LLVMConstantExprValueKind); in clone_constant_impl()
326 LLVMOpcode Op = LLVMGetConstOpcode(Cst); in clone_constant_impl()
329 return LLVMConstBitCast(clone_constant(LLVMGetOperand(Cst, 0), M), in clone_constant_impl()
330 TypeCloner(M).Clone(Cst)); in clone_constant_impl()