summaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/CodeView/Formatters.cpp
AgeCommit message (Collapse)Author
2023-01-05Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ partserge-sans-paille
Use deduction guides instead of helper functions. The only non-automatic changes have been: 1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*)) 2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase. 3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated. 4. The "reference mode" of makeArrayRef(ArrayRef<T> &) that acts as no-op is not supported (a constructor cannot achieve that). Per reviewers' comment, some useless makeArrayRef have been removed in the process. This is a follow-up to https://reviews.llvm.org/D140896 that introduced the deduction guides. Differential Revision: https://reviews.llvm.org/D140955
2022-02-08Cleanup LLVMDebugInfoCodeView headersserge-sans-paille
Major user-facing changes: Many headers in llvm/DebugInfo/CodeView no longer include llvm/Support/BinaryStreamReader.h or llvm/Support/BinaryStreamWriter.h, those headers may need to be included manually. Several headers in llvm/DebugInfo/CodeView no longer include llvm/DebugInfo/CodeView/EnumTables.h or llvm/DebugInfo/CodeView/CodeView.h, those headers may need to be included manually. Some statistics: $ clang++ -E -Iinclude -I../llvm/include ../llvm/lib/DebugInfo/CodeView/*.cpp -std=c++14 -fno-rtti -fno-exceptions | wc -l after: 2794466 before: 2832765 Discourse thread on the topic: https://discourse.llvm.org/t/include-what-you-use-include-cleanup/ Differential Revision: https://reviews.llvm.org/D119092
2021-06-15[Debug-Info][CodeView] Fix GUID string generation for MSVC generated objects.CarlosAlbertoEnciso
This patch is to address https://bugs.llvm.org/show_bug.cgi?id=50459. YAML:455:28: error: GUID strings are 38 characters long The valid format for a GUID is {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} where X is a hex digit (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). The length of the individual components must be: 8, 4, 4, 4, 12. For some cases, the converted string generated by obj2yaml, does not comply with those lengths. yaml2obj checks that the GUID string must be 38 characters including the dashes and braces. Reviewed By: amccarth Differential Revision: https://reviews.llvm.org/D103089
2021-04-09[lld] Fixed CodeView GuidAdapter::format to handle GUID bytes in the right ↵Alex Orlov
order. This fixes https://bugs.llvm.org/show_bug.cgi?id=41712 bug. Reviewed By: aganea Differential Revision: https://reviews.llvm.org/D99978
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
2017-07-17[codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueIdReid Kleckner
Summary: We were treating the GUIDs in TypeServer2Record as strings, and the non-ASCII bytes in the GUID would not round-trip through YAML. We already had the PDB_UniqueId type portably represent a Windows GUID, but we need to hoist that up to the DebugInfo/CodeView library so that we can use it in the TypeServer2Record as well as in PDB parsing code. Reviewers: inglorion, amccarth Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D35495 llvm-svn: 308234
2017-06-30[CodeView, PDB] Fix some Clang-tidy modernize and Include What You Use ↵Eugene Zelenko
warnings; other minor fixes (NFC). llvm-svn: 306911
2017-02-03Properly parse the TypeServer2 record.Zachary Turner
llvm-svn: 294046