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

Side by Side Diff: src/IceELFSection.cpp

Issue 773583004: Subzero: Fix the g++ build (e.g. Windows). (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | src/IceOperand.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceELFSection.cpp - Representation of ELF sections -----===// 1 //===- subzero/src/IceELFSection.cpp - Representation of ELF sections -----===//
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 // This file defines how ELF sections are represented. 10 // This file defines how ELF sections are represented.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 NewSymbol.Sym.st_value = Offset; 48 NewSymbol.Sym.st_value = Offset;
49 NewSymbol.Sym.st_size = Size; 49 NewSymbol.Sym.st_size = Size;
50 NewSymbol.Number = ELFSym::UnknownNumber; 50 NewSymbol.Number = ELFSym::UnknownNumber;
51 SymtabKey Key = {Name, Section}; 51 SymtabKey Key = {Name, Section};
52 bool Unique; 52 bool Unique;
53 if (Type == STB_LOCAL) 53 if (Type == STB_LOCAL)
54 Unique = LocalSymbols.insert(std::make_pair(Key, NewSymbol)).second; 54 Unique = LocalSymbols.insert(std::make_pair(Key, NewSymbol)).second;
55 else 55 else
56 Unique = GlobalSymbols.insert(std::make_pair(Key, NewSymbol)).second; 56 Unique = GlobalSymbols.insert(std::make_pair(Key, NewSymbol)).second;
57 assert(Unique); 57 assert(Unique);
58 (void)Unique;
58 } 59 }
59 60
60 void ELFSymbolTableSection::noteUndefinedSym(const IceString &Name, 61 void ELFSymbolTableSection::noteUndefinedSym(const IceString &Name,
61 ELFSection *NullSection) { 62 ELFSection *NullSection) {
62 ELFSym NewSymbol = ELFSym(); 63 ELFSym NewSymbol = ELFSym();
63 NewSymbol.Sym.setBindingAndType(STB_GLOBAL, STT_NOTYPE); 64 NewSymbol.Sym.setBindingAndType(STB_GLOBAL, STT_NOTYPE);
64 NewSymbol.Number = ELFSym::UnknownNumber; 65 NewSymbol.Number = ELFSym::UnknownNumber;
65 SymtabKey Key = {Name, NullSection}; 66 SymtabKey Key = {Name, NullSection};
66 GlobalSymbols.insert(std::make_pair(Key, NewSymbol)); 67 GlobalSymbols.insert(std::make_pair(Key, NewSymbol));
67 } 68 }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 continue; 151 continue;
151 } 152 }
152 StringIndex.second = StringData.size(); 153 StringIndex.second = StringData.size();
153 std::copy(Cur.begin(), Cur.end(), back_inserter(StringData)); 154 std::copy(Cur.begin(), Cur.end(), back_inserter(StringData));
154 StringData.push_back(0); 155 StringData.push_back(0);
155 Prev = Cur; 156 Prev = Cur;
156 } 157 }
157 } 158 }
158 159
159 } // end of namespace Ice 160 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceGlobalContext.cpp » ('j') | src/IceOperand.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698