StringRef'ize EmitSourceFileHeader().
authorAhmed Charles <ace2001ac@gmail.com>
Sun, 19 Feb 2012 11:35:20 +0000 (11:35 +0000)
committerAhmed Charles <ace2001ac@gmail.com>
Sun, 19 Feb 2012 11:35:20 +0000 (11:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150917 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/TableGen/TableGenBackend.h
lib/TableGen/TableGenBackend.cpp

index 3f612de..3ebcd92 100644 (file)
@@ -16,7 +16,6 @@
 #define LLVM_TABLEGEN_TABLEGENBACKEND_H
 
 #include "llvm/Support/raw_ostream.h"
 #define LLVM_TABLEGEN_TABLEGENBACKEND_H
 
 #include "llvm/Support/raw_ostream.h"
-#include <string>
 
 namespace llvm {
 
 
 namespace llvm {
 
@@ -35,7 +34,7 @@ struct TableGenBackend {
 public:   // Useful helper routines...
   /// EmitSourceFileHeader - Output a LLVM style file header to the specified
   /// ostream.
 public:   // Useful helper routines...
   /// EmitSourceFileHeader - Output a LLVM style file header to the specified
   /// ostream.
-  void EmitSourceFileHeader(const std::string &Desc, raw_ostream &OS) const;
+  void EmitSourceFileHeader(StringRef Desc, raw_ostream &OS) const;
 
 };
 
 
 };
 
index 328d9a4..09bcc7a 100644 (file)
@@ -17,7 +17,7 @@ using namespace llvm;
 
 void TableGenBackend::anchor() { }
 
 
 void TableGenBackend::anchor() { }
 
-void TableGenBackend::EmitSourceFileHeader(const std::string &Desc,
+void TableGenBackend::EmitSourceFileHeader(StringRef Desc,
                                            raw_ostream &OS) const {
   OS << "//===- TableGen'erated file -------------------------------------*-"
        " C++ -*-===//\n//\n// " << Desc << "\n//\n// Automatically generate"
                                            raw_ostream &OS) const {
   OS << "//===- TableGen'erated file -------------------------------------*-"
        " C++ -*-===//\n//\n// " << Desc << "\n//\n// Automatically generate"