diff options
| author | Brian Gaeke <gaeke@uiuc.edu> | 2004-02-25 01:53:45 +0000 |
|---|---|---|
| committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-02-25 01:53:45 +0000 |
| commit | 04cff21c2fbe8238492615e67ab386e52c5fabb3 (patch) | |
| tree | b45f92cbe230c849bf9202e015f5fb4275df5d37 /llvm | |
| parent | 01d9231855e13f785c5c70502830c9ddd26e9106 (diff) | |
| download | bcm5719-llvm-04cff21c2fbe8238492615e67ab386e52c5fabb3.tar.gz bcm5719-llvm-04cff21c2fbe8238492615e67ab386e52c5fabb3.zip | |
Cygwin defines log2 as a macro. Undef it here IFF it has already been defined,
so that we always get the inline function instead. Remember, kids, like it says
in the GCC manual, "An Inline Function is As Fast As a Macro."
llvm-svn: 11815
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/Support/MathExtras.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/Support/MathExtras.h b/llvm/include/Support/MathExtras.h index 125aff3b9ff..1540de3fcab 100644 --- a/llvm/include/Support/MathExtras.h +++ b/llvm/include/Support/MathExtras.h @@ -18,6 +18,10 @@ namespace llvm { +#if defined(log2) +# undef log2 +#endif + inline unsigned log2(uint64_t C) { unsigned getPow; for (getPow = 0; C > 1; ++getPow) |

