• Home
  • Raw
  • Download

Lines Matching refs:Cst

227 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M);
229 static LLVMValueRef clone_constant(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant() argument
230 LLVMValueRef Ret = clone_constant_impl(Cst, M); in clone_constant()
231 check_value_kind(Ret, LLVMGetValueKind(Cst)); in clone_constant()
235 static LLVMValueRef clone_constant_impl(LLVMValueRef Cst, LLVMModuleRef M) { in clone_constant_impl() argument
236 if (!LLVMIsAConstant(Cst)) in clone_constant_impl()
240 if (LLVMIsAGlobalValue(Cst)) { in clone_constant_impl()
242 const char *Name = LLVMGetValueName2(Cst, &NameLen); in clone_constant_impl()
245 if (LLVMIsAFunction(Cst)) { in clone_constant_impl()
246 check_value_kind(Cst, LLVMFunctionValueKind); in clone_constant_impl()
250 unsigned ID = LLVMGetIntrinsicID(Cst); in clone_constant_impl()
264 if (LLVMIsAGlobalVariable(Cst)) { in clone_constant_impl()
265 check_value_kind(Cst, LLVMGlobalVariableValueKind); in clone_constant_impl()
273 if (LLVMIsAGlobalAlias(Cst)) { in clone_constant_impl()
274 check_value_kind(Cst, LLVMGlobalAliasValueKind); in clone_constant_impl()
286 if (LLVMIsAConstantInt(Cst)) { in clone_constant_impl()
287 check_value_kind(Cst, LLVMConstantIntValueKind); in clone_constant_impl()
288 return LLVMConstInt(TypeCloner(M).Clone(Cst), in clone_constant_impl()
289 LLVMConstIntGetZExtValue(Cst), false); in clone_constant_impl()
293 if (LLVMIsAConstantAggregateZero(Cst)) { in clone_constant_impl()
294 check_value_kind(Cst, LLVMConstantAggregateZeroValueKind); in clone_constant_impl()
295 return LLVMConstNull(TypeCloner(M).Clone(Cst)); in clone_constant_impl()
299 if (LLVMIsAConstantArray(Cst)) { in clone_constant_impl()
300 check_value_kind(Cst, LLVMConstantArrayValueKind); in clone_constant_impl()
301 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
305 Elts.push_back(clone_constant(LLVMGetOperand(Cst, i), M)); in clone_constant_impl()
310 if (LLVMIsAConstantDataArray(Cst)) { in clone_constant_impl()
311 check_value_kind(Cst, LLVMConstantDataArrayValueKind); in clone_constant_impl()
312 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
316 Elts.push_back(clone_constant(LLVMGetElementAsConstant(Cst, i), M)); in clone_constant_impl()
321 if (LLVMIsAConstantStruct(Cst)) { in clone_constant_impl()
322 check_value_kind(Cst, LLVMConstantStructValueKind); in clone_constant_impl()
323 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
327 Elts.push_back(clone_constant(LLVMGetOperand(Cst, i), M)); in clone_constant_impl()
335 if (LLVMIsAConstantPointerNull(Cst)) { in clone_constant_impl()
336 check_value_kind(Cst, LLVMConstantPointerNullValueKind); in clone_constant_impl()
337 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
342 if (LLVMIsUndef(Cst)) { in clone_constant_impl()
343 check_value_kind(Cst, LLVMUndefValueValueKind); in clone_constant_impl()
344 return LLVMGetUndef(TypeCloner(M).Clone(Cst)); in clone_constant_impl()
348 if (LLVMIsPoison(Cst)) { in clone_constant_impl()
349 check_value_kind(Cst, LLVMPoisonValueValueKind); in clone_constant_impl()
350 return LLVMGetPoison(TypeCloner(M).Clone(Cst)); in clone_constant_impl()
354 if (LLVMIsNull(Cst)) { in clone_constant_impl()
355 check_value_kind(Cst, LLVMConstantTokenNoneValueKind); in clone_constant_impl()
356 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
361 if (LLVMIsAConstantFP(Cst)) { in clone_constant_impl()
362 check_value_kind(Cst, LLVMConstantFPValueKind); in clone_constant_impl()
367 if (LLVMIsAConstantVector(Cst)) { in clone_constant_impl()
368 check_value_kind(Cst, LLVMConstantVectorValueKind); in clone_constant_impl()
369 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
373 Elts.push_back(clone_constant(LLVMGetOperand(Cst, i), M)); in clone_constant_impl()
378 if (LLVMIsAConstantDataVector(Cst)) { in clone_constant_impl()
379 check_value_kind(Cst, LLVMConstantDataVectorValueKind); in clone_constant_impl()
380 LLVMTypeRef Ty = TypeCloner(M).Clone(Cst); in clone_constant_impl()
384 Elts.push_back(clone_constant(LLVMGetElementAsConstant(Cst, i), M)); in clone_constant_impl()
390 if (!LLVMIsAConstantExpr(Cst)) in clone_constant_impl()
394 check_value_kind(Cst, LLVMConstantExprValueKind); in clone_constant_impl()
396 LLVMOpcode Op = LLVMGetConstOpcode(Cst); in clone_constant_impl()
399 return LLVMConstBitCast(clone_constant(LLVMGetOperand(Cst, 0), M), in clone_constant_impl()
400 TypeCloner(M).Clone(Cst)); in clone_constant_impl()