"preserved across the asm statement, and clobbering them may "
"lead to undefined behaviour.";
MMI->getModule()->getContext().diagnose(DiagnosticInfoInlineAsm(
- LocCookie, Msg.c_str(), DiagnosticSeverity::DS_Warning));
+ LocCookie, Msg, DiagnosticSeverity::DS_Warning));
MMI->getModule()->getContext().diagnose(
DiagnosticInfoInlineAsm(LocCookie, Note, DiagnosticSeverity::DS_Note));
}
M.getOrInsertFunction(StringRef("__printf_alloc"), FTy_alloc, Attr);
LLVM_DEBUG(dbgs() << "Printf metadata = " << Sizes.str() << '\n');
- std::string fmtstr = itostr(++UniqID) + ":" + Sizes.str().c_str();
+ std::string fmtstr = itostr(++UniqID) + ":" + Sizes.str();
MDString *fmtStrArray = MDString::get(Ctx, fmtstr);
// Instead of creating global variables, the
return true;
}
StringRef ModifierName = Parser.getTok().getString();
- ModifierKind = AVRMCExpr::getKindByName(ModifierName.str().c_str());
+ ModifierKind = AVRMCExpr::getKindByName(ModifierName);
if (ModifierKind != AVRMCExpr::VK_AVR_None) {
Parser.Lex();
if (Parser.getTok().getString() == GENERATE_STUBS &&
Parser.getTok().getKind() == AsmToken::Identifier) {
std::string GSModName = ModifierName.str() + "_" + GENERATE_STUBS;
- ModifierKind = AVRMCExpr::getKindByName(GSModName.c_str());
+ ModifierKind = AVRMCExpr::getKindByName(GSModName);
if (ModifierKind != AVRMCExpr::VK_AVR_None)
Parser.Lex(); // Eat gs modifier name
}
Parser.getLexer().peekTok().getKind() == AsmToken::LParen) {
StringRef ModifierName = Parser.getTok().getString();
AVRMCExpr::VariantKind ModifierKind =
- AVRMCExpr::getKindByName(ModifierName.str().c_str());
+ AVRMCExpr::getKindByName(ModifierName);
if (ModifierKind != AVRMCExpr::VK_AVR_None) {
Parser.Lex();
Parser.Lex(); // Eat the modifier and parenthesis
int64_t RegNum = Const->getValue();
std::ostringstream RegName;
RegName << "r" << RegNum;
- RegNum = MatchRegisterName(RegName.str().c_str());
+ RegNum = MatchRegisterName(RegName.str());
if (RegNum != AVR::NoRegister) {
Op.makeReg(RegNum);
if (validateOperandClass(Op, Expected) == Match_Success) {