[ms-inline asm] Avoid extra allocations by making this an array of StringRefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161703 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/AST/Stmt.h b/include/clang/AST/Stmt.h
index cb2eabb..79e1920 100644
--- a/include/clang/AST/Stmt.h
+++ b/include/clang/AST/Stmt.h
@@ -1633,7 +1633,7 @@
   Token *AsmToks;
   unsigned *LineEnds;
   Stmt **Exprs;
-  StringRef **Clobbers;
+  StringRef *Clobbers;
 
 public:
   MSAsmStmt(ASTContext &C, SourceLocation asmloc, bool issimple,
@@ -1665,7 +1665,7 @@
   //===--- 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 c9cca55..d877c3f 100644
--- a/lib/AST/Stmt.cpp
+++ b/lib/AST/Stmt.cpp
@@ -600,13 +600,13 @@
   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);
   }
 }