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

Side by Side Diff: src/IceELFObjectWriter.cpp

Issue 1343283002: Subzero: Remove an unwanted assert. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceELFObjectWriter.cpp - ELF object file writer --------===// 1 //===- subzero/src/IceELFObjectWriter.cpp - ELF object file writer --------===//
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 598
599 void ELFObjectWriter::setUndefinedSyms(const ConstantList &UndefSyms) { 599 void ELFObjectWriter::setUndefinedSyms(const ConstantList &UndefSyms) {
600 for (const Constant *S : UndefSyms) { 600 for (const Constant *S : UndefSyms) {
601 const auto Sym = llvm::cast<ConstantRelocatable>(S); 601 const auto Sym = llvm::cast<ConstantRelocatable>(S);
602 const IceString &Name = Sym->getName(); 602 const IceString &Name = Sym->getName();
603 bool BadIntrinsic; 603 bool BadIntrinsic;
604 const Intrinsics::FullIntrinsicInfo *Info = 604 const Intrinsics::FullIntrinsicInfo *Info =
605 Ctx.getIntrinsicsInfo().find(Name, BadIntrinsic); 605 Ctx.getIntrinsicsInfo().find(Name, BadIntrinsic);
606 if (Info) 606 if (Info)
607 continue; 607 continue;
608 assert(!BadIntrinsic); 608 // Ignore BadIntrinsic, which is set if the name begins with "llvm." but
609 // doesn't match a known intrinsic. If we want this to turn into an error,
610 // we should catch it early on.
609 assert(Sym->getOffset() == 0); 611 assert(Sym->getOffset() == 0);
610 assert(Sym->getSuppressMangling()); 612 assert(Sym->getSuppressMangling());
611 SymTab->noteUndefinedSym(Name, NullSection); 613 SymTab->noteUndefinedSym(Name, NullSection);
612 StrTab->add(Name); 614 StrTab->add(Name);
613 } 615 }
614 } 616 }
615 617
616 void ELFObjectWriter::writeRelocationSections(RelSectionList &RelSections) { 618 void ELFObjectWriter::writeRelocationSections(RelSectionList &RelSections) {
617 for (ELFRelocationSection *RelSec : RelSections) { 619 for (ELFRelocationSection *RelSec : RelSections) {
618 Elf64_Off Offset = alignFileOffset(RelSec->getSectionAlign()); 620 Elf64_Off Offset = alignFileOffset(RelSec->getSectionAlign());
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 if (ELF64) { 671 if (ELF64) {
670 writeELFHeaderInternal<true>(ShOffset, ShStrTab->getNumber(), 672 writeELFHeaderInternal<true>(ShOffset, ShStrTab->getNumber(),
671 AllSections.size()); 673 AllSections.size());
672 } else { 674 } else {
673 writeELFHeaderInternal<false>(ShOffset, ShStrTab->getNumber(), 675 writeELFHeaderInternal<false>(ShOffset, ShStrTab->getNumber(),
674 AllSections.size()); 676 AllSections.size());
675 } 677 }
676 } 678 }
677 679
678 } // end of namespace Ice 680 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698