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:
parent
9cd7c1ab8e
commit
f01ac414c5
@ -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.
|
||||
|
@ -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());
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
///
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user