1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Use StringRef instead of std::string in DIEString.

llvm-svn: 89793
This commit is contained in:
Devang Patel 2009-11-24 19:42:17 +00:00
parent 9cd7c1ab8e
commit f01ac414c5
5 changed files with 6 additions and 6 deletions

View File

@ -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.

View File

@ -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());
}

View File

@ -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.
///

View File

@ -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);

View File

@ -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.
///