mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Simplify some uses of Value::getName()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76786 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b834a7b73c
commit
8f60302ee5
@ -103,8 +103,8 @@ static ExFunc lookupFunction(const Function *F) {
|
||||
if (FnPtr == 0)
|
||||
FnPtr = FuncNames["lle_X_"+F->getName()];
|
||||
if (FnPtr == 0) // Try calling a generic function... if it exists...
|
||||
FnPtr = (ExFunc)(intptr_t)sys::DynamicLibrary::SearchForAddressOfSymbol(
|
||||
("lle_X_"+F->getName()).c_str());
|
||||
FnPtr = (ExFunc)(intptr_t)
|
||||
sys::DynamicLibrary::SearchForAddressOfSymbol("lle_X_"+F->getName());
|
||||
if (FnPtr != 0)
|
||||
ExportedFunctions->insert(std::make_pair(F, FnPtr)); // Cache for later
|
||||
return FnPtr;
|
||||
|
@ -1924,7 +1924,7 @@ bool CWriter::doInitialization(Module &M) {
|
||||
Out << " __HIDDEN__";
|
||||
|
||||
if (I->hasName() && I->getName()[0] == 1)
|
||||
Out << " LLVM_ASM(\"" << I->getName().c_str()+1 << "\")";
|
||||
Out << " LLVM_ASM(\"" << I->getName().substr(1) << "\")";
|
||||
|
||||
Out << ";\n";
|
||||
}
|
||||
|
@ -430,7 +430,10 @@ namespace {
|
||||
} else {
|
||||
name = getTypePrefix(val->getType());
|
||||
}
|
||||
name += (val->hasName() ? val->getName() : utostr(uniqueNum++));
|
||||
if (val->hasName())
|
||||
name += val->getName();
|
||||
else
|
||||
name += utostr(uniqueNum++);
|
||||
sanitize(name);
|
||||
NameSet::iterator NI = UsedNames.find(name);
|
||||
if (NI != UsedNames.end())
|
||||
|
Loading…
x
Reference in New Issue
Block a user