diff options
| author | Stephen Hines <srhines@google.com> | 2012-09-10 16:47:31 -0700 |
|---|---|---|
| committer | Stephen Hines <srhines@google.com> | 2012-09-10 16:47:31 -0700 |
| commit | 1c4ad5ef4fab105f0c8af7edd026e00502fb6279 (patch) | |
| tree | cb5bdfd58f776d00be450d0a5585f8f0186585da /include/llvm/Support/Compiler.h | |
| parent | d62cdbe700ab288e9ad447824066edb7d17167d9 (diff) | |
| parent | 1dc2591e9ef0730612902f94976ce85bed6859de (diff) | |
| download | external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.zip external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.gz external_llvm-1c4ad5ef4fab105f0c8af7edd026e00502fb6279.tar.bz2 | |
Merge branch 'upstream' into merge-2012_09_10
Conflicts:
lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
lib/Support/DynamicLibrary.cpp
lib/Support/LockFileManager.cpp
Change-Id: I91e94c3a7a76e19c688307c5a480a640a3bd2b7e
Diffstat (limited to 'include/llvm/Support/Compiler.h')
| -rw-r--r-- | include/llvm/Support/Compiler.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Support/Compiler.h b/include/llvm/Support/Compiler.h index ea0a4da..1136ff7 100644 --- a/include/llvm/Support/Compiler.h +++ b/include/llvm/Support/Compiler.h @@ -24,7 +24,7 @@ /// does not imply the existence of any other C++ library features. #if (__has_feature(cxx_rvalue_references) \ || defined(__GXX_EXPERIMENTAL_CXX0X__) \ - || _MSC_VER >= 1600) + || (defined(_MSC_VER) && _MSC_VER >= 1600)) #define LLVM_USE_RVALUE_REFERENCES 1 #else #define LLVM_USE_RVALUE_REFERENCES 0 @@ -106,9 +106,11 @@ #endif #if (__GNUC__ >= 4) -#define BUILTIN_EXPECT(EXPR, VALUE) __builtin_expect((EXPR), (VALUE)) +#define LLVM_LIKELY(EXPR) __builtin_expect((bool)(EXPR), true) +#define LLVM_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false) #else -#define BUILTIN_EXPECT(EXPR, VALUE) (EXPR) +#define LLVM_LIKELY(EXPR) (EXPR) +#define LLVM_UNLIKELY(EXPR) (EXPR) #endif |
