aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-05-05 16:25:23 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-05-05 16:25:23 +0000
commit6005b875b09ed1b3c5bc90a304db307b67886f75 (patch)
treec397cad5cb970e7bb0e9f652b2ab19cd990e7401
parent5f6bf5d44138a3537822ac057cd7576375c94df1 (diff)
downloadexternal_llvm-6005b875b09ed1b3c5bc90a304db307b67886f75.zip
external_llvm-6005b875b09ed1b3c5bc90a304db307b67886f75.tar.gz
external_llvm-6005b875b09ed1b3c5bc90a304db307b67886f75.tar.bz2
Small syntax cleanup; we don't need to #define constants in C++. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130926 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index fdf3767..c6be223 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -225,9 +225,10 @@ static bool FunctionCallsSetJmp(const Function *F) {
"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 @@ static bool FunctionCallsSetJmp(const Function *F) {
}
return false;
-#undef NUM_RETURNS_TWICE_FNS
}
/// SplitCriticalSideEffectEdges - Look for critical edges with a PHI value that