aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/AST/Stmt.h4
-rw-r--r--lib/AST/Stmt.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index cb2eabbaed..79e1920159 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -1633,7 +1633,7 @@ class MSAsmStmt : public Stmt {
Token *AsmToks;
unsigned *LineEnds;
Stmt **Exprs;
- StringRef **Clobbers;
+ StringRef *Clobbers;
public:
MSAsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple,
@@ -1665,7 +1665,7 @@ public:
//===--- Other ---===//
unsigned getNumClobbers() const { return NumClobbers; }
- StringRef *getClobber(unsigned i) { return Clobbers[i]; }
+ StringRef getClobber(unsigned i) { return Clobbers[i]; }
SourceRange getSourceRange() const LLVM_READONLY {
return SourceRange(AsmLoc, EndLoc);
diff --git a/lib/AST/Stmt.cpp b/lib/AST/Stmt.cpp
index c9cca556f4..d877c3fab7 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -600,13 +600,13 @@ MSAsmStmt::MSAsmStmt(ASTContext &C, SourceLocation asmloc,
for (unsigned i = 0, e = NumLineEnds; i != e; ++i)
LineEnds[i] = lineends[i];
- Clobbers = new (C) StringRef*[NumClobbers];
+ Clobbers = new (C) StringRef[NumClobbers];
for (unsigned i = 0, e = NumClobbers; i != e; ++i) {
// FIXME: Avoid the allocation/copy if at all possible.
size_t size = clobbers[i].size();
char *dest = new (C) char[size];
std::strncpy(dest, clobbers[i].data(), size);
- Clobbers[i] = new (C) StringRef(dest, size);
+ Clobbers[i] = StringRef(dest, size);
}
}