aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Charles <ace2001ac@gmail.com>2012-02-19 11:35:20 +0000
committerAhmed Charles <ace2001ac@gmail.com>2012-02-19 11:35:20 +0000
commitd7ace3f8d1b7216d7381c408b26259e1201f7c29 (patch)
tree8345c630f77baa7aa85baae5a0eced114cb99048
parent1bf724b28b7a44d5323f9e42718192987c75ce79 (diff)
downloadexternal_llvm-d7ace3f8d1b7216d7381c408b26259e1201f7c29.zip
external_llvm-d7ace3f8d1b7216d7381c408b26259e1201f7c29.tar.gz
external_llvm-d7ace3f8d1b7216d7381c408b26259e1201f7c29.tar.bz2
StringRef'ize EmitSourceFileHeader().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150917 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/TableGen/TableGenBackend.h3
-rw-r--r--lib/TableGen/TableGenBackend.cpp2
2 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/TableGen/TableGenBackend.h b/include/llvm/TableGen/TableGenBackend.h
index 3f612de..3ebcd92 100644
--- a/include/llvm/TableGen/TableGenBackend.h
+++ b/include/llvm/TableGen/TableGenBackend.h
@@ -16,7 +16,6 @@
#define LLVM_TABLEGEN_TABLEGENBACKEND_H
#include "llvm/Support/raw_ostream.h"
-#include <string>
namespace llvm {
@@ -35,7 +34,7 @@ struct TableGenBackend {
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;
};
diff --git a/lib/TableGen/TableGenBackend.cpp b/lib/TableGen/TableGenBackend.cpp
index 328d9a4..09bcc7a 100644
--- a/lib/TableGen/TableGenBackend.cpp
+++ b/lib/TableGen/TableGenBackend.cpp
@@ -17,7 +17,7 @@ using namespace llvm;
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"