[llvm-commits] [llvm] r76553 - in /llvm/trunk: lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp lib/ExecutionEngine/ExecutionEngine.cpp lib/ExecutionEngine/JIT/JIT.cpp lib/ExecutionEngine/JIT/JITEmitter.cpp tools/llvm-prof/llvm-prof.cpp
Daniel Dunbar
daniel at zuster.org
Tue Jul 21 01:54:36 PDT 2009
Author: ddunbar
Date: Tue Jul 21 03:54:24 2009
New Revision: 76553
URL: http://llvm.org/viewvc/llvm-project?rev=76553&view=rev
Log:
Simplify / normalize some uses of Value::getName.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
llvm/trunk/tools/llvm-prof/llvm-prof.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=76553&r1=76552&r2=76553&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Jul 21 03:54:24 2009
@@ -568,7 +568,7 @@
if (ViewDAGCombine1 || ViewLegalizeTypesDAGs || ViewLegalizeDAGs ||
ViewDAGCombine2 || ViewDAGCombineLT || ViewISelDAGs || ViewSchedDAGs ||
ViewSUnitDAGs)
- BlockName = CurDAG->getMachineFunction().getFunction()->getName() + ':' +
+ BlockName = CurDAG->getMachineFunction().getFunction()->getName() + ":" +
BB->getBasicBlock()->getName();
DOUT << "Initial selection DAG:\n";
Modified: llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp?rev=76553&r1=76552&r2=76553&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/ExecutionEngine.cpp Tue Jul 21 03:54:24 2009
@@ -993,7 +993,7 @@
// External variable reference. Try to use the dynamic loader to
// get a pointer to it.
if (void *SymAddr =
- sys::DynamicLibrary::SearchForAddressOfSymbol(I->getName().c_str()))
+ sys::DynamicLibrary::SearchForAddressOfSymbol(I->getName()))
addGlobalMapping(I, SymAddr);
else {
llvm_report_error("Could not resolve external global address: "
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=76553&r1=76552&r2=76553&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Tue Jul 21 03:54:24 2009
@@ -686,7 +686,7 @@
if (GV->getName() == "__dso_handle")
return (void*)&__dso_handle;
#endif
- Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName().c_str());
+ Ptr = sys::DynamicLibrary::SearchForAddressOfSymbol(GV->getName());
if (Ptr == 0 && !areDlsymStubsEnabled()) {
llvm_report_error("Could not resolve external global address: "
+GV->getName());
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=76553&r1=76552&r2=76553&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Tue Jul 21 03:54:24 2009
@@ -1432,7 +1432,7 @@
SmallVector<unsigned, 8> Offsets;
for (unsigned i = 0; i != GVs.size(); ++i) {
Offsets.push_back(offset);
- offset += GVs[i]->getName().length() + 1;
+ offset += GVs[i]->getName().size() + 1;
}
for (StringMapConstIterator<void*> i = ExtFns.begin(), e = ExtFns.end();
i != e; ++i) {
Modified: llvm/trunk/tools/llvm-prof/llvm-prof.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-prof/llvm-prof.cpp?rev=76553&r1=76552&r2=76553&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-prof/llvm-prof.cpp (original)
+++ llvm/trunk/tools/llvm-prof/llvm-prof.cpp Tue Jul 21 03:54:24 2009
@@ -185,7 +185,7 @@
std::cout << std::setw(3) << i+1 << ". "
<< std::setw(5) << FunctionCounts[i].second << "/"
<< TotalExecutions << " "
- << FunctionCounts[i].first->getName().c_str() << "\n";
+ << FunctionCounts[i].first->getName() << "\n";
}
std::set<Function*> FunctionsToPrint;
@@ -219,8 +219,8 @@
<< Counts[i].second/(double)TotalExecutions*100 << "% "
<< std::setw(5) << Counts[i].second << "/"
<< TotalExecutions << "\t"
- << F->getName().c_str() << "() - "
- << Counts[i].first->getName().c_str() << "\n";
+ << F->getName() << "() - "
+ << Counts[i].first->getName() << "\n";
FunctionsToPrint.insert(F);
}
More information about the llvm-commits
mailing list