[ELF] Change return type of the OutputSection::flags() method
authorSimon Atanasyan <simon@atanasyan.com>
Tue, 21 Apr 2015 17:02:49 +0000 (17:02 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Tue, 21 Apr 2015 17:02:49 +0000 (17:02 +0000)
This method returns _flags field which has `uint64_t` type. Now the
field's type and the method's return type are consistent.

llvm-svn: 235393

lld/lib/ReaderWriter/ELF/SectionChunks.h
lld/lib/ReaderWriter/ELF/TargetLayout.cpp

index d4d38cdacfa6218ddabf93b4eba301498840b32f..6565ce0e4f49fa62b45694d497901813fb68dcb2 100644 (file)
@@ -259,7 +259,7 @@ public:
   uint64_t fileSize() const { return _size; }
   int64_t entsize() const { return _entSize; }
   uint64_t fileOffset() const { return _fileOffset; }
-  int64_t flags() const { return _flags; }
+  uint64_t flags() const { return _flags; }
   uint64_t memSize() { return _memSize; }
 
 private:
index b32bc10da06105e7f7c871ec30b41497577fa62e..001b53a97ec802acb9327f3e34427d75043c2a38 100644 (file)
@@ -362,7 +362,7 @@ template <class ELFT> void TargetLayout<ELFT>::assignSectionsToSegments() {
       section->setSegmentType(segmentType);
       StringRef segmentName = section->segmentKindToStr();
 
-      int64_t lookupSectionFlag = osi->flags();
+      uint64_t lookupSectionFlag = osi->flags();
       if ((!(lookupSectionFlag & llvm::ELF::SHF_WRITE)) &&
           (_ctx.mergeRODataToTextSegment()))
         lookupSectionFlag &= ~llvm::ELF::SHF_EXECINSTR;