• Home
  • Raw
  • Download

Lines Matching refs:FormatStr

2372   StringRef FormatStr;  in optimizePrintFString()  local
2373 if (!getConstantStringInfo(CI->getArgOperand(0), FormatStr)) in optimizePrintFString()
2377 if (FormatStr.empty()) // Tolerate printf's declared void. in optimizePrintFString()
2387 if (FormatStr.size() == 1 || FormatStr == "%%") in optimizePrintFString()
2388 return emitPutChar(B.getInt32(FormatStr[0]), B, TLI); in optimizePrintFString()
2391 if (FormatStr == "%s" && CI->getNumArgOperands() > 1) { in optimizePrintFString()
2401 if (FormatStr[FormatStr.size() - 1] == '\n' && in optimizePrintFString()
2402 FormatStr.find('%') == StringRef::npos) { // No format characters. in optimizePrintFString()
2405 FormatStr = FormatStr.drop_back(); in optimizePrintFString()
2406 Value *GV = B.CreateGlobalString(FormatStr, "str"); in optimizePrintFString()
2412 if (FormatStr == "%c" && CI->getNumArgOperands() > 1 && in optimizePrintFString()
2417 if (FormatStr == "%s\n" && CI->getNumArgOperands() > 1 && in optimizePrintFString()
2463 StringRef FormatStr; in optimizeSPrintFString() local
2464 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeSPrintFString()
2471 if (FormatStr.find('%') != StringRef::npos) in optimizeSPrintFString()
2478 FormatStr.size() + 1)); // Copy the null byte. in optimizeSPrintFString()
2479 return ConstantInt::get(CI->getType(), FormatStr.size()); in optimizeSPrintFString()
2484 if (FormatStr.size() != 2 || FormatStr[0] != '%' || in optimizeSPrintFString()
2489 if (FormatStr[1] == 'c') { in optimizeSPrintFString()
2502 if (FormatStr[1] == 's') { in optimizeSPrintFString()
2591 StringRef FormatStr; in optimizeSnPrintFString() local
2592 if (!getConstantStringInfo(CI->getArgOperand(2), FormatStr)) in optimizeSnPrintFString()
2599 if (FormatStr.find('%') != StringRef::npos) in optimizeSnPrintFString()
2603 return ConstantInt::get(CI->getType(), FormatStr.size()); in optimizeSnPrintFString()
2604 else if (N < FormatStr.size() + 1) in optimizeSnPrintFString()
2612 FormatStr.size() + 1)); // Copy the null byte. in optimizeSnPrintFString()
2613 return ConstantInt::get(CI->getType(), FormatStr.size()); in optimizeSnPrintFString()
2618 if (FormatStr.size() == 2 && FormatStr[0] == '%' && in optimizeSnPrintFString()
2622 if (FormatStr[1] == 'c') { in optimizeSnPrintFString()
2640 if (FormatStr[1] == 's') { in optimizeSnPrintFString()
2676 StringRef FormatStr; in optimizeFPrintFString() local
2677 if (!getConstantStringInfo(CI->getArgOperand(1), FormatStr)) in optimizeFPrintFString()
2689 if (FormatStr.find('%') != StringRef::npos) in optimizeFPrintFString()
2694 ConstantInt::get(DL.getIntPtrType(CI->getContext()), FormatStr.size()), in optimizeFPrintFString()
2700 if (FormatStr.size() != 2 || FormatStr[0] != '%' || in optimizeFPrintFString()
2705 if (FormatStr[1] == 'c') { in optimizeFPrintFString()
2712 if (FormatStr[1] == 's') { in optimizeFPrintFString()