Fix Bitposition funtion (#8739)
authorHyeongseok Oh <hseok82.oh@samsung.com>
Wed, 28 Dec 2016 15:33:04 +0000 (00:33 +0900)
committerJan Kotas <jkotas@microsoft.com>
Wed, 28 Dec 2016 15:33:04 +0000 (07:33 -0800)
Fix Bitposition(value) function implementation to check platform, not target.
- cross-architecture component build error for ARM32/linux

src/inc/bitposition.h

index 392d9a6..df79155 100644 (file)
@@ -25,11 +25,11 @@ inline
 unsigned            BitPosition(unsigned value)
 {
     _ASSERTE((value != 0) && ((value & (value-1)) == 0));
-#if defined(_TARGET_ARM_) && defined(__llvm__)
+#if defined(_ARM_) && defined(__llvm__)
     // use intrinsic functions for arm32
     // this is applied for LLVM only but it may work for some compilers
     DWORD index = __builtin_clz(__builtin_arm_rbit(value));
-#elif !defined(_TARGET_AMD64_)
+#elif !defined(_AMD64_)
     const unsigned PRIME = 37;
 
     static const char hashTable[PRIME] =