summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-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. llvm-svn: 369013
* 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
* [PDB] Remove all clone() methods.Zachary Turner2018-09-121-4/+0
| | | | | | | These are dead code and encourage poor usage patterns, so I'm removing them. They weren't called anywhere anyway. llvm-svn: 342093
* [PDB] Refactor the PDB symbol classes to fix a reuse bug.Zachary Turner2018-09-051-6/+0
| | | | | | | | | | | | | | | | | | | | The way DIA SDK works is that when you request a symbol, it gets assigned an internal identifier that is unique for the life of the session. You can then use this identifier to get back the same symbol, with all of the same internal state that it had before, even if you "destroyed" the original copy of the object you had. This didn't work properly in our native implementation, and if you destroyed an object for a particular symbol, then requested the same symbol again, it would get assigned a new ID and you'd get a fresh copy of the object. In order to fix this some refactoring had to happen to properly reuse cached objects. Some unittests are added to verify that symbol reuse is taking place, making use of the new unittest input feature. llvm-svn: 341503
* [PDB] Add exclusive methods to derived symbol classAaron Smith2018-03-191-0/+15
| | | | | | | | | | | | Summary: This commit adds two methods to the PDBSymboFunc class used in parsing symbols. getLineNumbers() is used to determine a Function symbol's declaration and getCompilandId() is used to initialize the SymbolContext field sc.comp_unit. Reviewers: zturner, rnk, llvm-commits Reviewed By: zturner Differential Revision: https://reviews.llvm.org/D44457 llvm-svn: 327909
* Remove redundant includes from lib/DebugInfo.Michael Zolotukhin2017-12-131-1/+0
| | | | llvm-svn: 320620
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* [llvm-pdbdump] Recursively dump class layout.Zachary Turner2017-04-131-0/+11
| | | | llvm-svn: 300258
* General usability improvements to generic PDB library.Zachary Turner2017-04-101-8/+2
| | | | | | | | | | | | | | | | | | | | 1. Added some asserts to make sure concrete symbol types don't get constructed with RawSymbols that have an incompatible SymTag enum value. 2. Added new forwarding macros that auto-define an Id/Sym method pair whenever there is a method that returns a SymIndexId. Previously we would just provide one method that returned only the SymIndexId and it was up to the caller to use the Session object to get a pointer to the symbol. Now we automatically get both the method that returns the Id, as well as a method that returns the pointer directly with just one macro. 3. Added some methods for dumping straight to stdout that can be used from inside the debugger for diagnostics during a debug session. 4. Added a clone() method and a cast<T>() method to PDBSymbol that can shorten some usage patterns. llvm-svn: 299831
* Move pdb code into pdb namespace.Zachary Turner2016-05-041-0/+1
| | | | llvm-svn: 268544
* Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC)Alexander Kornienko2015-06-231-1/+1
| | | | | | Apparently, the style needs to be agreed upon first. llvm-svn: 240390
* Fixed/added namespace ending comments using clang-tidy. NFCAlexander Kornienko2015-06-191-1/+1
| | | | | | | | | | | | | The patch is generated using this command: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \ -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \ llvm/lib/ Thanks to Eugene Kosov for the original patch! llvm-svn: 240137
* Use 'override/final' instead of 'virtual' for overridden methodsAlexander Kornienko2015-04-111-5/+6
| | | | | | | | | | | | | | The patch is generated using clang-tidy misc-use-override check. This command was used: tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \ -checks='-*,misc-use-override' -header-filter='llvm|clang' \ -j=32 -fix -format http://reviews.llvm.org/D8925 llvm-svn: 234679
* [llvm-pdbdump] Clean up method signatures.Zachary Turner2015-03-011-4/+1
| | | | llvm-svn: 230889
* [llvm-pdbdump] Add an option to dump full class definitions.Zachary Turner2015-02-231-0/+74
| | | | | | | | | | | This adds the --class-definitions flag. If specified, when dumping types, instead of "class Foo" you will see the full class definition, with member functions, constructors, access specifiers. NOTE: Using this option can be very slow, as generating a full class definition requires accessing many different parts of the PDB. llvm-svn: 230203
* [llvm-pdbdump] Rewrite dumper using visitor pattern.Zachary Turner2015-02-221-60/+4
| | | | | | | | | | This increases the flexibility of how to dump different symbol types -- necessary for context-sensitive formatting of symbol types -- and also improves the modularity by allowing the dumping to be implemented in the actual dumper, as opposed to in the PDB library. llvm-svn: 230184
* llvm-pdbdump: Add flags controlling the type of values to dump.Zachary Turner2015-02-151-52/+44
| | | | llvm-svn: 229330
* llvm-pdbdump: Only dump whitelisted global symbols.Zachary Turner2015-02-141-0/+4
| | | | | | | | | | Dumping the global scope contains a lot of very uninteresting things and is generally polluted with a lot of random junk. Furthermore, it dumps values unsorted, making it hard to read. This patch dumps known interesting types only, and as a side effect sorts the list by symbol type. llvm-svn: 229232
* llvm-pdbdump: Re-order header files according to LLVM style guide.Zachary Turner2015-02-141-1/+2
| | | | llvm-svn: 229231
* Fix -Wunused-variable warning.Zachary Turner2015-02-131-1/+0
| | | | llvm-svn: 229130
* llvm-pdbdump: Improve printing of functions and signatures.Zachary Turner2015-02-131-13/+30
| | | | | | | | | This correctly prints the function pointers, and also prints function signatures for symbols as opposed to just types. So actual functions in your program will now be printed with full name and signature, as opposed to just name as before. llvm-svn: 229129
* Re-sort #include lines using my handy dandy ./utils/sort_includes.pyChandler Carruth2015-02-131-3/+1
| | | | | | script. This is in preparation for changes to lots of include lines. llvm-svn: 229088
* llvm-pdbdump: Add more comprehensive dumping of symbol types.Zachary Turner2015-02-131-4/+11
| | | | | | | | | In particular this patch adds the ability to dump complete function signature information including argument types as correctly formatted strings. A side effect of this is that almost all symbol and meta types are now formatted. llvm-svn: 229076
* Improve llvm-pdbdump output display.Zachary Turner2015-02-131-8/+29
| | | | | | | | | | | | This patch adds a number of improvements to llvm-pdbdump. 1) Dumping of the entire global scope, and not only those symbols that live in individual compilands. 2) Prepend class name to member functions and data 3) Improved display of bitfields. 4) Support for dumping more kinds of data symbols. llvm-svn: 229012
* Add concrete type overloads to PDBSymbol::findChildren().Zachary Turner2015-02-121-20/+6
| | | | | | | | | | | | Frequently you only want to iterate over children of a specific type (e.g. functions). Previously you would get back a generic interface that allowed iteration over the base symbol type, which you would have to dyn_cast<> each one of. With this patch, we allow the user to specify the concrete type as a template parameter, and it will return an iterator which returns instances of the concrete type directly. llvm-svn: 228960
* Fix some warnings due to -Wcovered-switch-default.Zachary Turner2015-02-111-2/+0
| | | | llvm-svn: 228773
* Rewrite llvm-pdbdump in terms of LLVMDebugInfoPDB.Zachary Turner2015-02-101-2/+44
| | | | | | | | | | | | | This makes llvm-pdbdump available on all platforms, although it will currently fail to create a dumper if there is no PDB reader implementation for the current platform. It implements dumping of compilands and children, which is less information than was previously available, but it has to be rewritten from scratch using the new set of interfaces, so the rest of the functionality will be added back in subsequent commits. llvm-svn: 228755
* Make PDBSymbol's IPDBSymbol reference const.Zachary Turner2015-02-081-1/+1
| | | | llvm-svn: 228553
* DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.Zachary Turner2015-02-081-2/+3
| | | | | | | | | Dumping a symbol often requires access to data that isn't inside the symbol hierarchy, but which is only accessible through the top-level session. This patch is a pure interface change to give symbols a reference to the session. llvm-svn: 228542
* Some cleanup for libpdb.Zachary Turner2015-02-081-0/+20
This patch implements a few of the optional suggestions from the initial patch comitting libpdb. In particular, it implements a virtual function out of line for each of the concrete classes. A few other minor cleanups exist as well, such as using override instead of virtual, etc. llvm-svn: 228516
OpenPOWER on IntegriCloud