| 368 | } |
| 369 | |
| 370 | void EmitLogging(const char* tag, llvm::Value* value, llvm::IRBuilder<>* b) { |
| 371 | llvm::FunctionType* log_function_type = llvm::FunctionType::get( |
| 372 | b->getVoidTy(), {b->getInt64Ty(), b->getInt64Ty()}, /*isVarArg=*/false); |
| 373 | b->CreateCall(log_function_type, |
| 374 | b->CreateIntToPtr(b->getInt64(absl::bit_cast<int64>(&LogS64)), |
| 375 | log_function_type->getPointerTo()), |
| 376 | {b->getInt64(absl::bit_cast<int64>(tag)), value}); |
| 377 | } |
| 378 | |
| 379 | void SetAlignmentMetadataForLoad(llvm::LoadInst* load, uint64_t alignment) { |
| 380 | llvm::LLVMContext& context = load->getContext(); |
nothing calls this directly
no test coverage detected