summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-11-24 19:42:17 +0000
committerDevang Patel <dpatel@apple.com>2009-11-24 19:42:17 +0000
commitb3e0168428de7994560a37ae1d931dd9d1f367a9 (patch)
tree8a77a7f4025cc747cdb57f33e97cdd1c8d3cc2d6
parent831451b417043788a54d790e24a97b9817f45695 (diff)
downloadbcm5719-llvm-b3e0168428de7994560a37ae1d931dd9d1f367a9.tar.gz
bcm5719-llvm-b3e0168428de7994560a37ae1d931dd9d1f367a9.zip
Use StringRef instead of std::string in DIEString.
llvm-svn: 89793
-rw-r--r--llvm/include/llvm/CodeGen/AsmPrinter.h2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIE.h4
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h2
5 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h
index 0a4d9bd7da7..9a07e31ac70 100644
--- a/llvm/include/llvm/CodeGen/AsmPrinter.h
+++ b/llvm/include/llvm/CodeGen/AsmPrinter.h
@@ -297,7 +297,7 @@ namespace llvm {
/// EmitString - Emit a string with quotes and a null terminator.
/// Special characters are emitted properly.
/// @verbatim (Eg. '\t') @endverbatim
- void EmitString(const std::string &String) const;
+ void EmitString(const StringRef String) const;
void EmitString(const char *String, unsigned Size) const;
/// EmitFile - Emit a .file directive.
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 8eae7b23a02..993cdbfb76c 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -728,7 +728,7 @@ static void printStringChar(formatted_raw_ostream &O, unsigned char C) {
/// EmitString - Emit a string with quotes and a null terminator.
/// Special characters are emitted properly.
/// \literal (Eg. '\t') \endliteral
-void AsmPrinter::EmitString(const std::string &String) const {
+void AsmPrinter::EmitString(const StringRef String) const {
EmitString(String.data(), String.size());
}
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.h b/llvm/lib/CodeGen/AsmPrinter/DIE.h
index d073da7d1b8..dc6a70a6bd6 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIE.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DIE.h
@@ -277,9 +277,9 @@ namespace llvm {
/// DIEString - A string value DIE.
///
class DIEString : public DIEValue {
- const std::string Str;
+ const StringRef Str;
public:
- explicit DIEString(const std::string &S) : DIEValue(isString), Str(S) {}
+ explicit DIEString(const StringRef S) : DIEValue(isString), Str(S) {}
/// EmitValue - Emit string value.
///
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 4ba156c6a23..f8873a4d941 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -333,7 +333,7 @@ void DwarfDebug::addSInt(DIE *Die, unsigned Attribute,
/// addString - Add a string attribute data and value.
///
void DwarfDebug::addString(DIE *Die, unsigned Attribute, unsigned Form,
- const std::string &String) {
+ const StringRef String) {
DIEValue *Value = new DIEString(String);
DIEValues.push_back(Value);
Die->addValue(Attribute, Form, Value);
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 01d0e3c7498..19583b84c5f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -244,7 +244,7 @@ class DwarfDebug : public Dwarf {
/// addString - Add a string attribute data and value.
///
void addString(DIE *Die, unsigned Attribute, unsigned Form,
- const std::string &String);
+ const StringRef Str);
/// addLabel - Add a Dwarf label attribute data and value.
///
OpenPOWER on IntegriCloud