StringMap<DIE*>::iterator::first() returns a pointer to the first character of

the key. This will cause it to create a new std::string, which isn't
wanted. Instead, pass back the "const char*". Modify the EmitString() method to
take a "const char*".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68741 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2009-04-09 23:51:31 +00:00
parent 923838533a
commit f34be827ac
3 changed files with 10 additions and 5 deletions

View File

@@ -285,7 +285,8 @@ namespace llvm {
/// Special characters are emitted properly.
/// @verbatim (Eg. '\t') @endverbatim
void EmitString(const std::string &String) const;
void EmitString(const char *String, unsigned Size) const;
/// EmitFile - Emit a .file directive.
void EmitFile(unsigned Number, const std::string &Name) const;