public:
MSAsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple,
bool isvolatile, ArrayRef<Token> asmtoks,
- ArrayRef<unsigned> lineends, std::string &asmstr,
+ ArrayRef<unsigned> lineends, StringRef asmstr,
SourceLocation endloc);
SourceLocation getAsmLoc() const { return AsmLoc; }
MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc,
bool issimple, bool isvolatile, ArrayRef<Token> asmtoks,
- ArrayRef<unsigned> lineends, std::string &asmstr,
+ ArrayRef<unsigned> lineends, StringRef asmstr,
SourceLocation endloc)
: Stmt(MSAsmStmtClass), AsmLoc(asmloc), EndLoc(endloc),
- AsmStr(asmstr), IsSimple(issimple), IsVolatile(isvolatile),
+ AsmStr(asmstr.str()), IsSimple(issimple), IsVolatile(isvolatile),
NumAsmToks(asmtoks.size()), NumLineEnds(lineends.size()) {
AsmToks = new (C) Token[NumAsmToks];
// Empty asm statements don't need to instantiate the AsmParser, etc.
if (AsmToks.empty()) {
- std::string AsmString;
+ StringRef AsmString;
MSAsmStmt *NS =
new (Context) MSAsmStmt(Context, AsmLoc, /* IsSimple */ true,
/* IsVolatile */ true, AsmToks, LineEnds,