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;
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";
}
} 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())