[PATCH] D11839: Adding SymbolRef::getSectionName for getting a textual section name for the symbol. Updating llvm-objdump to use this

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 15:06:39 PDT 2015


ruiu added inline comments.

================
Comment at: lib/Object/ELFObjectFile.cpp:60-67
@@ +59,10 @@
+std::string ELFObjectFileBase::getNameFromSHN(uint32_t Index) const {
+  std::string Name;
+  {
+    llvm::raw_string_ostream Stream(Name);
+    Stream << "SHN_PROC[";
+    Stream.write_hex(Index);
+    Stream << "]";
+  }
+  return Name;
+}
----------------
This can be

  return Twine("SHN_PROC[0x") + Twine::utohexstr(Index) + "]";

?


http://reviews.llvm.org/D11839





More information about the llvm-commits mailing list