mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Simplify some uses of Value::getName()
llvm-svn: 76786
This commit is contained in:
parent
d247ca6f40
commit
0ff394b13d
@ -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…
Reference in New Issue
Block a user