mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
remove a couple of actively incorrect uses of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
27891030ed
commit
0b3735e65a
@ -54,7 +54,7 @@
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/Mangler.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#include "llvm/ADT/SmallString.h"
|
||||
using namespace llvm;
|
||||
|
||||
char ELFWriter::ID = 0;
|
||||
@ -906,9 +906,11 @@ void ELFWriter::EmitStringTable(const std::string &ModuleName) {
|
||||
ELFSym &Sym = *(*I);
|
||||
|
||||
std::string Name;
|
||||
if (Sym.isGlobalValue())
|
||||
Name.append(Mang->getMangledName(Sym.getGlobalValue()));
|
||||
else if (Sym.isExternalSym())
|
||||
if (Sym.isGlobalValue()) {
|
||||
SmallString<40> NameStr;
|
||||
Mang->getNameWithPrefix(NameStr, Sym.getGlobalValue(), false);
|
||||
Name.append(NameStr.begin(), NameStr.end());
|
||||
} else if (Sym.isExternalSym())
|
||||
Name.append(Sym.getExternalSymbol());
|
||||
else if (Sym.isFileType())
|
||||
Name.append(ModuleName);
|
||||
|
@ -955,7 +955,8 @@ shouldEmitUsedDirectiveFor(const GlobalValue *GV, Mangler *Mang) const {
|
||||
// FIXME: ObjC metadata is currently emitted as internal symbols that have
|
||||
// \1L and \0l prefixes on them. Fix them to be Private/LinkerPrivate and
|
||||
// this horrible hack can go away.
|
||||
const std::string &Name = Mang->getMangledName(GV);
|
||||
SmallString<64> Name;
|
||||
Mang->getNameWithPrefix(NameTmp, GV, false);
|
||||
if (Name[0] == 'L' || Name[0] == 'l')
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user