summaryrefslogtreecommitdiffstats
path: root/lld/COFF/PDB.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [PDB] Print the most redundant type record indices with /summaryReid Kleckner2020-01-021-1/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: I used this information to motivate splitting up the Intrinsic::ID enum (5d986953c8b917bacfaa1f800fc1e242559f76be) and adding a key method to clang::Sema (586f65d31f32ca6bc8cfdb8a4f61bee5057bf6c8) which saved a fair amount of object file size. Example output for clang.pdb: Top 10 types responsible for the most TPI input bytes: index total bytes count size 0x3890: 8,671,220 = 1,805 * 4,804 0xE13BE: 5,634,720 = 252 * 22,360 0x6874C: 5,181,600 = 408 * 12,700 0x2A1F: 4,520,528 = 1,574 * 2,872 0x64BFF: 4,024,020 = 469 * 8,580 0x1123: 4,012,020 = 2,157 * 1,860 0x6952: 3,753,792 = 912 * 4,116 0xC16F: 3,630,888 = 633 * 5,736 0x69DD: 3,601,160 = 985 * 3,656 0x678D: 3,577,904 = 319 * 11,216 In this case, we can see that record 0x3890 is responsible for ~8MB of total object file size for objects in clang. The user can then use llvm-pdbutil to find out what the record is: $ llvm-pdbutil dump -types -type-index 0x3890 Types (TPI Stream) ============================================================ Showing 1 records. 0x3890 | LF_FIELDLIST [size = 4804] - LF_STMEMBER [name = `WORDTYPE_MAX`, type = 0x1001, attrs = public] - LF_MEMBER [name = `U`, Type = 0x37F0, offset = 0, attrs = private] - LF_MEMBER [name = `BitWidth`, Type = 0x0075 (unsigned), offset = 8, attrs = private] - LF_METHOD [name = `APInt`, # overloads = 8, overload list = 0x3805] ... In this case, we can see that these are members of the APInt class, which is emitted in 1805 object files. The next largest type is ASTContext: $ llvm-pdbutil dump -types -type-index 0xE13BE bin/clang.pdb 0xE13BE | LF_FIELDLIST [size = 22360] - LF_BCLASS type = 0x653EA, offset = 0, attrs = public - LF_MEMBER [name = `Types`, Type = 0x653EB, offset = 8, attrs = private] - LF_MEMBER [name = `ExtQualNodes`, Type = 0x653EC, offset = 24, attrs = private] - LF_MEMBER [name = `ComplexTypes`, Type = 0x653ED, offset = 48, attrs = private] - LF_MEMBER [name = `PointerTypes`, Type = 0x653EE, offset = 72, attrs = private] ... ASTContext only appears 252 times, but the list of members is long, and must be repeated everywhere it is used. This was the output before I split Intrinsic::ID: Top 10 types responsible for the most TPI input: 0x686C: 69,823,920 = 1,070 * 65,256 0x686D: 69,819,640 = 1,070 * 65,252 0x686E: 69,819,640 = 1,070 * 65,252 0x686B: 16,371,000 = 1,070 * 15,300 ... These records were all lists of intrinsic enums. Reviewers: MaskRay, ruiu Subscribers: mgrang, zturner, thakis, hans, akhuang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71437
* [COFF] Avoid CodeView include in headerReid Kleckner2019-11-141-2/+4
| | | | | Most LLD/COFF files don't care about CodeView. Avoid using CodeView types in InputFiles.h.
* [LLD] [COFF] Update a leftover comment after SVN r374869. NFC.Martin Storsjo2019-10-151-1/+1
| | | | llvm-svn: 374874
* [LLD] [COFF] Wrap file location pair<StringRef,int> in Optional<>. NFC.Martin Storsjo2019-10-151-6/+6
| | | | | | | | | This makes use of it slightly clearer, and makes it match the same construct in the lld ELF linker. Differential Revision: https://reviews.llvm.org/D68935 llvm-svn: 374869
* [PDB] Fix bug when using multiple PCH header objects with the same name.Zachary Turner2019-10-101-17/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | A common pattern in Windows is to have all your precompiled headers use an object named stdafx.obj. If you've got a project with many different static libs, you might use a separate PCH for each one of these. During the final link step, a file from A might reference the PCH object from A, but it will have the same name (stdafx.obj) as any other PCH from another project. The only difference will be the path. For example, A might be A/stdafx.obj while B is B/stdafx.obj. The existing algorithm checks only the filename that was passed on the command line (or stored in archive), but this is insufficient in the case where relative paths are used, because depending on the command line object file / library order, it might find the wrong PCH object first resulting in a signature mismatch. The fix here is to simply check whether the absolute path of the PCH object (which is stored in the input obj file for the file that references the PCH) *ends with* the full relative path of whatever is specified on the command line (or is in the archive). Differential Revision: https://reviews.llvm.org/D66431 llvm-svn: 374442
* [COFF] Wrap definitions in namespace lld { namespace coff {. NFCFangrui Song2019-10-101-4/+8
| | | | | | | | | | | Similar to D67323, but for COFF. Many lld/COFF/ files already use `namespace lld { namespace coff {`. Only a few need changing. Reviewed By: ruiu Differential Revision: https://reviews.llvm.org/D68772 llvm-svn: 374314
* Unify the two CRC implementationsHans Wennborg2019-10-091-4/+2
| | | | | | | | | | | | | | | | | | | | | David added the JamCRC implementation in r246590. More recently, Eugene added a CRC-32 implementation in r357901, which falls back to zlib's crc32 function if present. These checksums are essentially the same, so having multiple implementations seems unnecessary. This replaces the CRC-32 implementation with the simpler one from JamCRC, and implements the JamCRC interface in terms of CRC-32 since this means it can use zlib's implementation when available, saving a few bytes and potentially making it faster. JamCRC took an ArrayRef<char> argument, and CRC-32 took a StringRef. This patch changes it to ArrayRef<uint8_t> which I think is the best choice, and simplifies a few of the callers nicely. Differential revision: https://reviews.llvm.org/D68570 llvm-svn: 374148
* [LLD] [COFF] Resolve source locations for undefined references using dwarfMartin Storsjo2019-09-251-2/+2
| | | | | | | | This fixes PR42407. Differential Revision: https://reviews.llvm.org/D67053 llvm-svn: 372843
* [COFF] Print the file name on errors writing the pdb fileMartin Storsjo2019-08-201-0/+1
| | | | | | | | | | | This avoids confusing contextless error messages such as "No such file or directory" if e.g. the pdb output file should be written to a nonexistent directory. (This can happen with linkrepro scripts, at least old ones.) Differential Revision: https://reviews.llvm.org/D66466 llvm-svn: 369425
* [LLD] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-1/+1
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368936
* [COFF] Rename variale references in comments after VariableName -> ↵Fangrui Song2019-07-161-3/+3
| | | | | | variableName change llvm-svn: 366193
* [Coding style change][lld] Rename variables for non-ELF portsRui Ueyama2019-07-111-878/+878
| | | | | | | | | | | This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory. With this, the naming style conversion is complete for lld. Differential Revision: https://reviews.llvm.org/D64473 llvm-svn: 365730
* [PDB] Ignore .debug$S subsections with high bit setReid Kleckner2019-06-181-0/+5
| | | | | | | | Some versions of the Visual C++ 2015 runtime have line tables with the subsection kind of 0x800000F2. In cvinfo.h, 0x80000000 is documented to be DEBUG_S_IGNORE. This appears to implement the intended behavior. llvm-svn: 363724
* Include the file in the new unknown codeview subsection warningReid Kleckner2019-06-141-1/+1
| | | | llvm-svn: 363466
* [lld] Fix type server merging with PDBs without IPI streamReid Kleckner2019-06-121-13/+20
| | | | | | | | | | | | | | | PDBs may not necessarily contain an IPI stream. Handle this case gracefully. The test case was verified to work with MS link.exe. Patch by Vladimir Panteleev, with a small simplification Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D63178 llvm-svn: 363213
* [PDB] Copy inlinee lines records into the PDBReid Kleckner2019-06-031-16/+87
| | | | | | | | | | | | | | | | | | Summary: - Fixes inline call frame line table display in windbg. - Improve llvm-pdbutil to dump extra file ids. - Warn on unknown subsections so we don't have this kind of bug in the future. Reviewers: inglorion, akhuang, aganea Subscribers: eraman, zturner, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62701 llvm-svn: 362429
* Re-land [LLD][COFF] Early load PDB type server filesAlexandre Ganea2019-06-031-110/+12
| | | | | | | | | | We need to have all input files ready before doing debuginfo type merging. This patch is moving the late PDB type server discovery much earlier in the process, when the explicit inputs (OBJs, LIBs) are loaded. The short term goal is to parallelize type merging. Differential Revision: https://reviews.llvm.org/D60095 llvm-svn: 362393
* Revert r361842 as it breaks LLDB :: tools/lldb-mi/exec/exec-finish.testAlexandre Ganea2019-05-281-11/+109
| | | | llvm-svn: 361876
* [LLD][COFF] Early load PDB type server filesAlexandre Ganea2019-05-281-109/+11
| | | | | | | | | | We need to have all input files ready before doing debuginfo type merging. This patch is moving the late PDB type server discovery much earlier in the process, when the explicit inputs (OBJs, LIBs) are loaded. The short term goal is to parallelize type merging. Differential Revision: https://reviews.llvm.org/D60095 llvm-svn: 361842
* [COFF] Replace OutputSection* with uint16_t index in ChunkReid Kleckner2019-05-241-1/+1
| | | | | | | | | | | | | | Shaves another 8 bytes off of SectionChunk, the most commonly allocated type in LLD. These indices are only valid after we've assigned chunks to output sections and removed empty sections, so do that in a new pass. Reviewers: ruiu, aganea Differential Revision: https://reviews.llvm.org/D62356 llvm-svn: 361657
* [COFF] Simplify Chunk::writeTo and remove OutputSectionOff, NFCReid Kleckner2019-05-091-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this change, every implementation of writeTo would add OutputSectionOff to the output section buffer start before writing data. Instead, do this math in the caller, so that it can be written once instead of many times. The output section offset is always equivalent to the difference between the chunk RVA and the output section RVA, so we can replace the one remaining usage of OutputSectionOff with that subtraction. This doesn't change the size of SectionChunk because of alignment requirements, but I will rearrange the fields in a follow-up change to accomplish that. Reviewers: ruiu, aganea Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61696 llvm-svn: 360376
* Shrink SectionChunk by combining Relocs and SectionName sizesReid Kleckner2019-05-031-1/+1
| | | | | | | | | | | | | | | | | SectionChunk is one of the most frequently allocated data structures in LLD, since there are about four per function when optimizations and debug info are enabled (.text, .pdata, .xdata, .debug$S). A PE COFF file cannot be larger than 2GB, so there is an inherent limit on the length of the section name and the number of relocations. Decompose the ArrayRef and StringRef into pointer and size, and put them back together in the accessors for section name and relocation list. I plan to gather complete performance numbers later by padding SectionChunk with dead data and measuring performance after all the size optimizations are done. llvm-svn: 359923
* [codeview] Remove Type member from CVRecordReid Kleckner2019-04-041-3/+3
| | | | | | | | | | | | | | | | | Summary: Now CVType and CVSymbol are effectively type-safe wrappers around ArrayRef<uint8_t>. Make the kind() accessor load it from the RecordPrefix, which is the same for types and symbols. Reviewers: zturner, aganea Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60018 llvm-svn: 357658
* [LLD][COFF] Move type merging structures out of PDB.cpp. NFCAlexandre Ganea2019-04-021-54/+23
| | | | | | | | | | | | Introduce a new TypeMerger class, out of some type-merge-specific structures from PDB.cpp No changes intended / this is only moving code around. This patch is step 3. in "Proposed commit strategy" in D59226 Differential Revision: https://reviews.llvm.org/D60070 llvm-svn: 357525
* [LLD][COFF] Early dependency detectionAlexandre Ganea2019-04-011-59/+38
| | | | | | | | | | | | We introduce a new class hierarchy for debug types merging (in DebugTypes.h). The end-goal is to parallelize the type merging - please see the plan in D59226. Previously, dependency discovery was done on the fly, much later, during the type merging loop. Unfortunately, parallelizing the type merging requires the dependencies to be merged in first, before any dependent ObjFile, thus this early discovery. The overall intention for this path is to discover debug information dependencies at a much earlier stage, when processing input files. Currently, two types of dependency are supported: PDB type servers (when compiling with MSVC /Zi) and precompiled headers OBJs (when compiling with MSVC /Yc and /Yu). Once discovered, an explicit link is added into the dependent ObjFile, through the new debug types class hierarchy introduced in DebugTypes.h. Differential Revision: https://reviews.llvm.org/D59053 llvm-svn: 357383
* Fix build following r357308 : Ensure only live thunks are considered when ↵Alexandre Ganea2019-03-291-0/+3
| | | | | | creating import modules llvm-svn: 357316
* [LLD][COFF] Generate import modules & COFF groups in PDBAlexandre Ganea2019-03-291-12/+136
| | | | | | | | | | | | Generate import modules for each imported DLL, along with its symbol stream. Also create COFF groups in the * Linker * module, one for each PartialSection (input, unmerged sections) Currently COFF groups are disabled for MINGW because it significantly increases PDB sizes. We could enable that later with an option. The overall objective for this change is to support code hot patching tools. Such tools need to know the import libraries used, from the PDB alone. Differential Revision: https://reviews.llvm.org/D54802 llvm-svn: 357308
* [COFF] Optimize range extension thunk insertion memory usageReid Kleckner2019-03-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This avoids allocating O(#relocs) of intermediate data for each section when range extension thunks aren't needed for that section. This also removes a std::vector from SectionChunk, which further reduces its size. Instead, this change adds the range extension thunk symbols to the object files that contain sections that need extension thunks. By adding them to the symbol table of the parent object, that means they now have a symbol table index. Then we can then modify the original relocation, after copying it to read-write memory, to use the new symbol table index. This makes linking browser_tests.exe with no PDB 10.46% faster, moving it from 11.364s to 10.288s averaged over five runs. Reviewers: mstorsjo, ruiu Subscribers: aganea, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59902 llvm-svn: 357200
* [LLD][COFF] Separate module descriptors creation from type/symbol mergingAlexandre Ganea2019-03-221-26/+39
| | | | | | | | | | Take module DBI creation out of PDBLinker::addObjFile() into its own function. This is groundwork towards parallelizable type merging, as proposed in D59226. Differential Revision: https://reviews.llvm.org/D59261 llvm-svn: 356815
* [DebugInfo][PDB] Don't write empty debug streamsAlexandre Ganea2019-03-181-6/+13
| | | | | | | | | | | Before, empty debug streams were written as 8 bytes (4 bytes signature + 4 bytes for the GlobalRefs count). With this patch, unused empty streams aren't emitted anymore. Modules now encode 65535 as an 'unused stream' value, by convention. Also fix the * Linker * contrib section which wasn't correctly emitted previously. Differential Revision: https://reviews.llvm.org/D59502 llvm-svn: 356395
* [LLD][COFF] Add /summary to print statisticsAlexandre Ganea2019-03-141-1/+44
| | | | | | | | /summary prints information about the data (OBJ/LIB/PDB) processed by LLD. The goal is have an estimate about the inputs and outputs, to better understand where the timings go. Differential Revision: https://reviews.llvm.org/D58599 llvm-svn: 356188
* [LLD][COFF] Support /threads[:no] like the ELF driverAlexandre Ganea2019-02-271-5/+4
| | | | | | Differential review: https://reviews.llvm.org/D58594 llvm-svn: 355029
* [LLD][COFF] Add support for /FUNCTIONPADMIN command-line optionAlexandre Ganea2019-02-231-64/+7
| | | | | | | | | | Initial patch by Stefan Reinalter. Fixes PR36775 Differential Revision: https://reviews.llvm.org/D49366 llvm-svn: 354716
* [PDB] Remove dots and normalize slashes with /PDBSOURCEPATH.Zachary Turner2019-02-061-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In a previous patch, I made changes so that PDBs which were generated on non-Windows platforms contained sensical paths for the host. While this is an esoteric use case, we need it to be supported for certain cross compilation scenarios especially with LLDB, which can debug things on non-Windows platforms. However, this regressed a case where you specify /PDBSOURCEPATH and use a windows-style path. Previously, we would still remove dots and canonicalize slashes to backslashes, but since my change intentionally tried to support non-backslash paths, this was broken. This patch fixes the situation by trying to guess which path style the user is specifying when /PDBSOURCEPATH is passed. It is intentionally conservative, erring on the side of a Windows path style unless absolutely certain. All dots are removed and slashes canonicalized to whatever the deduced path style is after appending the file path to the /PDBSOURCEPATH argument. Differential Revision: https://reviews.llvm.org/D57769 llvm-svn: 353250
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Fix unchecked Error introduced in r350956Alexandre Ganea2019-01-111-1/+3
| | | | llvm-svn: 350968
* [LLD][COFF] Support /ignore:4099. Support /ignore with comma-separated ↵Alexandre Ganea2019-01-111-2/+4
| | | | | | | | arguments. Differential Revision: https://reviews.llvm.org/D56392 llvm-svn: 350956
* [CodeView] More appropriate name and type for a Microsoft precompiled ↵Alexandre Ganea2019-01-071-5/+5
| | | | | | headers parameter. NFC llvm-svn: 350520
* [LLD][COFF] PDB: Parallel sort publicsAlexandre Ganea2019-01-051-4/+5
| | | | | | | | | | | | | | | | Saves up to 1.3 sec on large PDBs. Figures below are for the "Globals Stream Layout" pass: Before This patch Large EXE (PDB is ~2 GB) 3330 ms 2022 ms Large EXE (PDB is ~2 GB) 2680 ms 1608 ms Large DLL (PDB is ~1 GB) 1455 ms 938 ms Large DLL (PDB is ~800 MB) 1215 ms 800 ms Small DLL (PDB is ~200 MB) 224 ms 146 ms Differential Revision: https://reviews.llvm.org/D56334 llvm-svn: 350452
* [LLD][COFF] Fix namespace compilation issue with a upcoming patch. NFCAlexandre Ganea2019-01-051-4/+4
| | | | llvm-svn: 350450
* [LLD][COFF] Fix file/line retrieval when a undefined symbol is to be printedAlexandre Ganea2019-01-041-7/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D55951 llvm-svn: 350438
* [codeview] Align symbol records to save 441MB during linking clang.pdbReid Kleckner2018-12-181-4/+6
| | | | | | | | | | | | | | | | | | | | In PDBs, symbol records must be aligned to four bytes. However, in the object file, symbol records may not be aligned. MSVC does not pad out symbol records to make sure they are aligned. That means the linker has to do extra work to insert the padding. Currently, LLD calculates the required space with alignment, and copies each record one at a time while padding them out to the correct size. It has a fast path that avoids this copy when the records are already aligned. This change fixes a bug in that codepath so that the copy is actually saved, and tweaks LLVM's symbol record emission to align symbol records. Here's how things compare when doing a plain clang Release+PDB build: - objs are 0.65% bigger (negligible) - link is 3.3% faster (negligible) - saves allocating 441MB - new LLD high water mark is ~1.05GB llvm-svn: 349431
* Correctly handle skewed streams in drop_front() method.Zachary Turner2018-12-131-1/+4
| | | | | | | | | | | | When calling BinaryStreamArray::drop_front(), if the stream is skewed it means we must never drop the first bytes of the stream since offsets which occur in records assume the existence of those bytes. So if we want to skip the first record in a stream, then what we really want to do is just set the begin pointer to the next record. But we shouldn't actually remove those bytes from the underlying view of the data. llvm-svn: 349066
* [PDB] Move some code around. NFC.Zachary Turner2018-12-061-34/+2
| | | | llvm-svn: 348505
* [PDB] Emit S_UDT records in LLD.Zachary Turner2018-12-041-11/+9
| | | | | | | | | | | Previously these were dropped. We now understand them sufficiently well to start emitting them. From the debugger's perspective, this now enables us to have debug info about typedefs (both global and function-locally scoped) Differential Revision: https://reviews.llvm.org/D55228 llvm-svn: 348306
* [PDB] Quote linker arguments containing spaces (mimic MSVC)Alexandre Ganea2018-11-301-1/+27
| | | | | | | | Initial patch by Will Wilson (@lantictac) Differential Revision: https://reviews.llvm.org/D55074 llvm-svn: 348001
* [PDB] Add symbol records in bulkReid Kleckner2018-11-271-31/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This speeds up linking clang.exe/pdb with /DEBUG:GHASH by 31%, from 12.9s to 9.8s. Symbol records are typically small (16.7 bytes on average), but we processed them one at a time. CVSymbol is a relatively "large" type. It wraps an ArrayRef<uint8_t> with a kind an optional 32-bit hash, which we don't need. Before this change, each DbiModuleDescriptorBuilder would maintain an array of CVSymbols, and would write them individually with a BinaryItemStream. With this change, we now add symbols that happen to appear contiguously in bulk. For each .debug$S section (roughly one per function), we allocate two copies, one for relocation, and one for realignment purposes. For runs of symbols that go in the module stream, which is most symbols, we now add them as a single ArrayRef<uint8_t>, so the vector DbiModuleDescriptorBuilder is roughly linear in the number of .debug$S sections (O(# funcs)) instead of the number of symbol records (very large). Some stats on symbol sizes for the curious: PDB size: 507M sym bytes: 316,508,016 sym count: 18,954,971 sym byte avg: 16.7 As future work, we may be able to skip copying symbol records in the linker for realignment purposes if we make LLVM write them aligned into the object file. We need to double check that such symbol records are still compatible with link.exe, but if so, it's definitely worth doing, since my profile shows we spend 500ms in memcpy in the symbol merging code. We could potentially cut that in half by saving a copy. Alternatively, we could apply the relocations *after* we iterate the symbols. This would require some careful re-engineering of the relocation processing code, though. Reviewers: zturner, aganea, ruiu Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D54554 llvm-svn: 347687
* [CodeView] RelocPtr points to little endian data.Zachary Turner2018-11-201-1/+1
| | | | | | | | | | Don't use a uint32_t*, use a ulittle32_t* to make this correct on big endian systems. Patch by James Clarke Differential Revision: https://reviews.llvm.org/D54421 llvm-svn: 347349
* [PDB] Simplify symbol handling code, NFCReid Kleckner2018-11-131-25/+22
| | | | | | | | | | | | | | | | | - Make mergeSymbolRecords a method of PDBLinker to reduce the number of parameters it needs. - Remove a stale FIXME comment about error handling. We already drop unknown symbol records, log them, and continue. - Update a comment about why we're copying the symbol record. We do it to realign the record. We can already mutate the symbol record memory, it's memory allocated by relocateDebugChunk. - Avoid the extra `CVSymbol NewSym` variable. We can mutate Sym in place, which is best, since we're mutating the underlying record anyway. llvm-svn: 346817
* [PDB] Simplify some ghash code, NFCReid Kleckner2018-11-101-17/+21
| | | | | | | Instead of calling the same function twice with different parameters, make the parameters depend on the condition. llvm-svn: 346578
OpenPOWER on IntegriCloud