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

Unified Diff: src/IceELFObjectWriter.cpp

Issue 1860473002: Subzero. Refactors Switch Lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fixes pre-review issues. Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: src/IceELFObjectWriter.cpp
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp
index c3ba9b070ab24fd6397e7d3842afbe3bd3300b4c..536af298935eb352849b64ac7d03c8971e2ff0ce 100644
--- a/src/IceELFObjectWriter.cpp
+++ b/src/IceELFObjectWriter.cpp
@@ -582,12 +582,8 @@ void ELFObjectWriter::writeJumpTable(const JumpTableData &JT,
const Elf64_Xword PointerSize = typeWidthInBytes(getPointerType());
const Elf64_Xword ShAddralign = PointerSize;
const Elf64_Xword ShEntsize = PointerSize;
- const GlobalString JTName = JT.getFunctionName();
const std::string SectionName = MangleSectionName(
- IsPIC ? ".data.rel.ro" : ".rodata",
- (JTName.hasStdString() ? JTName.toString()
- : std::to_string(JTName.getID())) +
- "$jumptable");
+ IsPIC ? ".data.rel.ro" : ".rodata", JT.getSectionName());
Section = createSection<ELFDataSection>(SectionName, SHT_PROGBITS, SHF_ALLOC,
ShAddralign, ShEntsize);
Section->setFileOffset(alignFileOffset(ShAddralign));
@@ -599,8 +595,7 @@ void ELFObjectWriter::writeJumpTable(const JumpTableData &JT,
Section->padToAlignment(Str, PointerSize);
const bool IsExternal = Ctx.getFlags().getDisableInternal();
const uint8_t SymbolBinding = IsExternal ? STB_GLOBAL : STB_LOCAL;
- GlobalString JumpTableName = Ctx.getGlobalString(
- InstJumpTable::makeName(JT.getFunctionName(), JT.getId()));
+ const auto JumpTableName = JT.getName();
SymTab->createDefinedSym(JumpTableName, SymbolType, SymbolBinding, Section,
Section->getCurrentSize(), PointerSize);
StrTab->add(JumpTableName);
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceGlobalContext.h » ('j') | src/IceGlobalContext.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698