1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

ELFObjectFile.h: Silence warning on Windows

The compiler was warning about using | on a uintptr_t and bool:

  Object/ELFObjectFile.h(131) : warning C4805: '|' : unsafe
  mix of type 'uintptr_t' and type 'bool' in operation

I think the warning might be useful in other cases, so I added
a cast instead of disabling it altogether.

llvm-svn: 188079
This commit is contained in:
Hans Wennborg 2013-08-09 16:48:21 +00:00
parent b46c740f23
commit cdac2bea49

View File

@ -128,7 +128,8 @@ protected: // ELF specific protected members.
DataRefImpl toDRI(Elf_Sym_Iter Symb) const {
DataRefImpl DRI;
DRI.p = reinterpret_cast<uintptr_t>(Symb.get()) | Symb.isDynamic();
DRI.p = reinterpret_cast<uintptr_t>(Symb.get()) |
static_cast<uintptr_t>(Symb.isDynamic());
return DRI;
}