[llvm] r188220 - [Object/ELF] sh_type is not a bitfield. Fixes RuntimeDyld test failure on ARM.

Michael J. Spencer bigcheesegs at gmail.com
Mon Aug 12 15:59:15 PDT 2013


Author: mspencer
Date: Mon Aug 12 17:59:14 2013
New Revision: 188220

URL: http://llvm.org/viewvc/llvm-project?rev=188220&view=rev
Log:
[Object/ELF] sh_type is not a bitfield. Fixes RuntimeDyld test failure on ARM.

Modified:
    llvm/trunk/include/llvm/Object/ELFObjectFile.h

Modified: llvm/trunk/include/llvm/Object/ELFObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=188220&r1=188219&r2=188220&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/ELFObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/ELFObjectFile.h Mon Aug 12 17:59:14 2013
@@ -577,14 +577,14 @@ ELFObjectFile<ELFT>::isSectionRequiredFo
 template <class ELFT>
 error_code ELFObjectFile<ELFT>::isSectionVirtual(DataRefImpl Sec,
                                                  bool &Result) const {
-  Result = toELFShdrIter(Sec)->sh_type & ELF::SHT_NOBITS;
+  Result = toELFShdrIter(Sec)->sh_type == ELF::SHT_NOBITS;
   return object_error::success;
 }
 
 template <class ELFT>
 error_code ELFObjectFile<ELFT>::isSectionZeroInit(DataRefImpl Sec,
                                                   bool &Result) const {
-  Result = toELFShdrIter(Sec)->sh_type & ELF::SHT_NOBITS;
+  Result = toELFShdrIter(Sec)->sh_type == ELF::SHT_NOBITS;
   return object_error::success;
 }
 





More information about the llvm-commits mailing list