Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1098)

Side by Side Diff: src/IceELFSection.h

Issue 1221643012: Subzero: Add -Wshadow to the build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 //===- subzero/src/IceELFSection.h - Model of ELF sections ------*- C++ -*-===// 1 //===- subzero/src/IceELFSection.h - Model of ELF sections ------*- C++ -*-===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 27 matching lines...) Expand all
38 38
39 /// Sentinel value for a section number/index for before the final 39 /// Sentinel value for a section number/index for before the final
40 /// section index is actually known. The dummy NULL section will be assigned 40 /// section index is actually known. The dummy NULL section will be assigned
41 /// number 0, and it is referenced by the dummy 0-th symbol in the symbol 41 /// number 0, and it is referenced by the dummy 0-th symbol in the symbol
42 /// table, so use max() instead of 0. 42 /// table, so use max() instead of 0.
43 enum { NoSectionNumber = std::numeric_limits<SizeT>::max() }; 43 enum { NoSectionNumber = std::numeric_limits<SizeT>::max() };
44 44
45 /// Constructs an ELF section, filling in fields that will be known 45 /// Constructs an ELF section, filling in fields that will be known
46 /// once the *type* of section is decided. Other fields may be updated 46 /// once the *type* of section is decided. Other fields may be updated
47 /// incrementally or only after the program is completely defined. 47 /// incrementally or only after the program is completely defined.
48 ELFSection(const IceString &Name, Elf64_Word ShType, Elf64_Xword ShFlags, 48 ELFSection(const IceString &MyName, Elf64_Word ShType, Elf64_Xword ShFlags,
49 Elf64_Xword ShAddralign, Elf64_Xword ShEntsize) 49 Elf64_Xword ShAddralign, Elf64_Xword ShEntsize)
50 : Name(Name), Header() { 50 : Name(MyName), Header() {
51 Header.sh_type = ShType; 51 Header.sh_type = ShType;
52 Header.sh_flags = ShFlags; 52 Header.sh_flags = ShFlags;
53 Header.sh_addralign = ShAddralign; 53 Header.sh_addralign = ShAddralign;
54 Header.sh_entsize = ShEntsize; 54 Header.sh_entsize = ShEntsize;
55 } 55 }
56 56
57 /// Set the section number/index after it is finally known. 57 /// Set the section number/index after it is finally known.
58 void setNumber(SizeT N) { 58 void setNumber(SizeT N) {
59 // Should only set the number once: from NoSectionNumber -> N. 59 // Should only set the number once: from NoSectionNumber -> N.
60 assert(Number == NoSectionNumber); 60 assert(Number == NoSectionNumber);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 Rel.setSymbolAndType(Symbol->getNumber(), Fixup.kind()); 375 Rel.setSymbolAndType(Symbol->getNumber(), Fixup.kind());
376 Str.writeAddrOrOffset<IsELF64>(Rel.r_offset); 376 Str.writeAddrOrOffset<IsELF64>(Rel.r_offset);
377 Str.writeELFWord<IsELF64>(Rel.r_info); 377 Str.writeELFWord<IsELF64>(Rel.r_info);
378 } 378 }
379 } 379 }
380 } 380 }
381 381
382 } // end of namespace Ice 382 } // end of namespace Ice
383 383
384 #endif // SUBZERO_SRC_ICEELFSECTION_H 384 #endif // SUBZERO_SRC_ICEELFSECTION_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698