[llvm] r270289 - Fix struct member names and simplify. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri May 20 15:59:10 PDT 2016
Author: ruiu
Date: Fri May 20 17:59:05 2016
New Revision: 270289
URL: http://llvm.org/viewvc/llvm-project?rev=270289&view=rev
Log:
Fix struct member names and simplify. NFC.
Modified:
llvm/trunk/lib/DebugInfo/PDB/Raw/SymbolStream.cpp
Modified: llvm/trunk/lib/DebugInfo/PDB/Raw/SymbolStream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/PDB/Raw/SymbolStream.cpp?rev=270289&r1=270288&r2=270289&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/PDB/Raw/SymbolStream.cpp (original)
+++ llvm/trunk/lib/DebugInfo/PDB/Raw/SymbolStream.cpp Fri May 20 17:59:05 2016
@@ -35,7 +35,7 @@ struct DataSym32 {
ulittle32_t TypIndex; // Type index, or Metadata token if a managed symbol
ulittle32_t off;
ulittle16_t seg;
- char name[1];
+ char Name[1];
};
// For S_PROCREF symbol type.
@@ -43,7 +43,7 @@ struct RefSym {
ulittle32_t SumName; // SUC of the name (?)
ulittle32_t SymOffset; // Offset of actual symbol in $$Symbols
ulittle16_t Mod; // Module containing the actual symbol
- char name[1];
+ char Name[1];
};
}
@@ -54,8 +54,6 @@ SymbolStream::~SymbolStream() {}
Error SymbolStream::reload() { return Error::success(); }
-static StringRef makeStringRef(char *p) { return {p, strlen(p)}; }
-
Expected<std::string> SymbolStream::getSymbolName(uint32_t Off) const {
StreamReader Reader(Stream);
Reader.setOffset(Off);
@@ -74,9 +72,9 @@ Expected<std::string> SymbolStream::getS
switch (Hdr.Type) {
case codeview::S_PUB32:
- return makeStringRef(reinterpret_cast<DataSym32 *>(Buf.data())->name);
+ return reinterpret_cast<DataSym32 *>(Buf.data())->Name;
case codeview::S_PROCREF:
- return makeStringRef(reinterpret_cast<RefSym *>(Buf.data())->name);
+ return reinterpret_cast<RefSym *>(Buf.data())->Name;
default:
return make_error<RawError>(raw_error_code::corrupt_file,
"Unknown symbol type");
More information about the llvm-commits
mailing list