/// EmitString - Emit a string with quotes and a null terminator.
/// Special characters are emitted properly.
/// @verbatim (Eg. '\t') @endverbatim
/// 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.
void EmitString(const char *String, unsigned Size) const;
/// EmitFile - Emit a .file directive.
/// EmitString - Emit a string with quotes and a null terminator.
/// Special characters are emitted properly.
/// \literal (Eg. '\t') \endliteral
/// 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());
}
EmitString(String.data(), String.size());
}
/// DIEString - A string value DIE.
///
class DIEString : public DIEValue {
/// DIEString - A string value DIE.
///
class DIEString : public DIEValue {
- explicit DIEString(const std::string &S) : DIEValue(isString), Str(S) {}
+ explicit DIEString(const StringRef S) : DIEValue(isString), Str(S) {}
/// EmitValue - Emit string value.
///
/// EmitValue - Emit string value.
///
/// addString - Add a string attribute data and value.
///
void DwarfDebug::addString(DIE *Die, unsigned Attribute, unsigned Form,
/// 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);
DIEValue *Value = new DIEString(String);
DIEValues.push_back(Value);
Die->addValue(Attribute, Form, Value);
/// addString - Add a string attribute data and value.
///
void addString(DIE *Die, unsigned Attribute, unsigned Form,
/// addString - Add a string attribute data and value.
///
void addString(DIE *Die, unsigned Attribute, unsigned Form,
- const std::string &String);
/// addLabel - Add a Dwarf label attribute data and value.
///
/// addLabel - Add a Dwarf label attribute data and value.
///