diff options
author | Devang Patel <dpatel@apple.com> | 2009-11-24 19:42:17 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-11-24 19:42:17 +0000 |
commit | e9a059714e3dccd6c870f19c3839f3352ac823ed (patch) | |
tree | e93476bcc5dcc6c4e0bb11f8987e8fb1d403e3aa /lib | |
parent | f5a7a2c84a1951151fee4e7e34d1d94ef0c31fa8 (diff) | |
download | external_llvm-e9a059714e3dccd6c870f19c3839f3352ac823ed.zip external_llvm-e9a059714e3dccd6c870f19c3839f3352ac823ed.tar.gz external_llvm-e9a059714e3dccd6c870f19c3839f3352ac823ed.tar.bz2 |
Use StringRef instead of std::string in DIEString.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89793 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIE.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 8eae7b2..993cdbf 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/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/lib/CodeGen/AsmPrinter/DIE.h b/lib/CodeGen/AsmPrinter/DIE.h index d073da7..dc6a70a 100644 --- a/lib/CodeGen/AsmPrinter/DIE.h +++ b/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/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 4ba156c..f8873a4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 01d0e3c..19583b8 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/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. /// |