[llvm-commits] [llvm] r130926 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Eli Friedman
eli.friedman at gmail.com
Thu May 5 09:25:23 PDT 2011
Author: efriedma
Date: Thu May 5 11:25:23 2011
New Revision: 130926
URL: http://llvm.org/viewvc/llvm-project?rev=130926&view=rev
Log:
Small syntax cleanup; we don't need to #define constants in C++. No functionality change intended.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=130926&r1=130925&r2=130926&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu May 5 11:25:23 2011
@@ -225,9 +225,10 @@
"vfork",
"getcontext"
};
-#define NUM_RETURNS_TWICE_FNS sizeof(ReturnsTwiceFns) / sizeof(const char *)
+ static const size_t NumReturnsTwiceFns = sizeof(ReturnsTwiceFns) /
+ sizeof(const char *);
- for (unsigned I = 0; I < NUM_RETURNS_TWICE_FNS; ++I)
+ for (unsigned I = 0; I < NumReturnsTwiceFns; ++I)
if (const Function *Callee = M->getFunction(ReturnsTwiceFns[I])) {
if (!Callee->use_empty())
for (Value::const_use_iterator
@@ -239,7 +240,6 @@
}
return false;
-#undef NUM_RETURNS_TWICE_FNS
}
/// SplitCriticalSideEffectEdges - Look for critical edges with a PHI value that
More information about the llvm-commits
mailing list