aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/AST/Stmt.cpp4
-rw-r--r--lib/Sema/SemaStmt.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index e5ff75eac6..f676711d7c 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -585,10 +585,10 @@ AsmStmt::AsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple,
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];
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 856a60203d..944fc40aad 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -2890,7 +2890,7 @@ StmtResult Sema::ActOnMSAsmStmt(SourceLocation AsmLoc,
// 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,