mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 07:24:25 +00:00
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:
@ -2664,13 +2664,13 @@ private:
|
||||
Asm->EOL("Compilation Unit Length");
|
||||
|
||||
StringMap<DIE*> &Globals = Unit->getGlobals();
|
||||
for (StringMap<DIE*>::iterator
|
||||
for (StringMap<DIE*>::const_iterator
|
||||
GI = Globals.begin(), GE = Globals.end(); GI != GE; ++GI) {
|
||||
const std::string &Name = GI->first();
|
||||
const char *Name = GI->getKeyData();
|
||||
DIE * Entity = GI->second;
|
||||
|
||||
Asm->EmitInt32(Entity->getOffset()); Asm->EOL("DIE offset");
|
||||
Asm->EmitString(Name); Asm->EOL("External Name");
|
||||
Asm->EmitString(Name, strlen(Name)); Asm->EOL("External Name");
|
||||
}
|
||||
|
||||
Asm->EmitInt32(0); Asm->EOL("End Mark");
|
||||
|
Reference in New Issue
Block a user