summaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/GenericError.cpp
AgeCommit message (Collapse)Author
2022-07-10ManagedStatic: remove many straightforward uses in llvmNicolai Hähnle
(Reapply after revert in e9ce1a588030d8d4004f5d7e443afe46245e9a92 due to Fuchsia test failures. Removed changes in lib/ExecutionEngine/ other than error categories, to be checked in more detail and reapplied separately.) Bulk remove many of the more trivial uses of ManagedStatic in the llvm directory, either by defining a new getter function or, in many cases, moving the static variable directly into the only function that uses it. Differential Revision: https://reviews.llvm.org/D129120
2022-07-10Revert "ManagedStatic: remove many straightforward uses in llvm"Nicolai Hähnle
This reverts commit e6f1f062457c928c18a88c612f39d9e168f65a85. Reverting due to a failure on the fuchsia-x86_64-linux buildbot.
2022-07-10ManagedStatic: remove many straightforward uses in llvmNicolai Hähnle
Bulk remove many of the more trivial uses of ManagedStatic in the llvm directory, either by defining a new getter function or, in many cases, moving the static variable directly into the only function that uses it. Differential Revision: https://reviews.llvm.org/D129120
2019-10-10[PDB] Fix bug when using multiple PCH header objects with the same name.Zachary Turner
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
2019-02-11Move some classes into anonymous namespaces. NFC.Benjamin Kramer
llvm-svn: 353710
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth
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
2018-11-08[LLD] Fix Microsoft precompiled headers cross-compile on LinuxAlexandre Ganea
Differential revision: https://reviews.llvm.org/D54122 llvm-svn: 346403
2018-11-05[COFF][LLD] Add link support for Microsoft precompiled headers OBJsAlexandre Ganea
This change allows for link-time merging of debugging information from Microsoft precompiled types OBJs compiled with cl.exe /Z7 /Yc and /Yu. This fixes llvm.org/PR34278 Differential Revision: https://reviews.llvm.org/D45213 llvm-svn: 346154
2018-09-10[LLD][COFF] Cleanup error messages / add more coverage testsAlexandre Ganea
- Log the reason for a PDB or precompiled-OBJ load failure - Properly handle out-of-date PDB or precompiled-OBJ signature by displaying a corresponding error - Slightly change behavior on PDB failure: any subsequent load attempt from another OBJ would result in the same error message being logged - Slightly change behavior on PDB failure: retry with filename only if previous error was ENOENT ("no such file or directory") - Tests: a. for native PDB errors; b. cover all the cases above Differential Revision: https://reviews.llvm.org/D51559 llvm-svn: 341825
2018-08-31[DebugInfo] Common behavior for error typesAlexandre Ganea
Following D50807, and heading towards D50664, this intermediary change does the following: 1. Upgrade all custom Error types in llvm/trunk/lib/DebugInfo/ to use the new StringError behavior (D50807). 2. Implement std::is_error_code_enum and make_error_code() for DebugInfo error enumerations. 3. Rename GenericError -> PDBError (the file will be renamed in a subsequent commit) 4. Update custom error messages to follow the same formatting: (\w\s*)+\. 5. Keep generic "file not found" (ENOENT) errors as they are in PDB code. Previously, there used to be a custom enumeration for that purpose. 6. Remove a few extraneous LF in log() implementations. Printing LF is a responsability at a higher level, not at the error level. Differential Revision: https://reviews.llvm.org/D51499 llvm-svn: 341228
2018-04-09[NFC] fix trivial typos in comments and error messageHiroshi Inoue
"is is" -> "is", "are are" -> "are" llvm-svn: 329546
2017-07-13[PDB] Fix type server handling for archivesReid Kleckner
Summary: This fixes type indices for SDK or CRT static archives. Previously we'd try to look next to the archive object file path, which would not exist on the local machine. Also error out if we can't resolve a type server record. Hypothetically we can recover from this error by discarding debug info for this object, but that is not yet implemented. Reviewers: ruiu, amccarth Subscribers: aprantl, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D35369 llvm-svn: 307946
2016-10-19Remove LLVM_NOEXCEPT and replace it with noexceptReid Kleckner
Now that we have dropped MSVC 2013, all supported compilers support noexcept and we can drop this portability macro. llvm-svn: 284672
2016-10-19[pdb] Improve error messages when DIA is not found.Zachary Turner
llvm-svn: 284610
2016-05-24Add FIXMEs to all derived classes of std::error_category.Peter Collingbourne
This helps make clear that we're moving away from std::error_code. Differential Revision: http://reviews.llvm.org/D20592 llvm-svn: 270604
2016-05-15Move helper classes into anonymous namespaces. NFC.Benjamin Kramer
llvm-svn: 269591
2016-05-06Port DebugInfoPDB over to using llvm::Error.Zachary Turner
Differential Revision: http://reviews.llvm.org/D19940 Reviewed By: rnk llvm-svn: 268791