summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DebugInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove dead code.Eric Christopher2013-07-241-5/+0
| | | | llvm-svn: 187017
* Remove unnecessary constructors as the default conversions will handleEric Christopher2013-07-241-18/+0
| | | | | | | all enumerated cases. Reformat the rest of the existing constructors to match. llvm-svn: 187015
* More constructor cleanup.Eric Christopher2013-07-241-6/+0
| | | | | | | Move to a single constructor with a default argument and avoid the check and nullification. llvm-svn: 187014
* Collapse logic and move and reword comment for clarity.Eric Christopher2013-07-241-3/+5
| | | | llvm-svn: 187013
* Add a fixme and reformat.Eric Christopher2013-07-241-4/+3
| | | | llvm-svn: 187012
* Debug Info: improve the Finder.Manman Ren2013-07-231-0/+9
| | | | | | | Improve the Finder to handle context of a DIVariable. If Scope is a DICompileUnit, add it to the list of CUs. llvm-svn: 187003
* Debug Info: clean up.Manman Ren2013-07-231-18/+6
| | | | llvm-svn: 187002
* Remove unused function.Eric Christopher2013-07-231-7/+0
| | | | llvm-svn: 187001
* Debug Info: code cleanup, use getNodeField if possible.Manman Ren2013-07-231-28/+15
| | | | | | | Use getNodeField to access a field as a MDNode. No functionality change. llvm-svn: 186985
* DebugInfo Verifier: verify the actual type.Manman Ren2013-07-231-0/+10
| | | | llvm-svn: 186972
* Debug Info Finder: use processDeclare and processValue to list debug infoManman Ren2013-07-231-0/+22
| | | | | | | | | | | MDNodes used by DbgDeclareInst and DbgValueInst. Another 16 testing cases failed and they are disabled with -disable-debug-info-verifier. A total of 34 cases are disabled with -disable-debug-info-verifier and will be corrected. llvm-svn: 186902
* Debug Info Finder: add processScope to actually handle the Scope.Manman Ren2013-07-221-3/+23
| | | | | | Instead of just adding the scope to the list, we actually handle the scope. llvm-svn: 186867
* Debug Info Verifier: simplify DIxxx::VerifyManman Ren2013-07-201-28/+14
| | | | | | | | Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes that should be a DIType and we will call Verify on those lists. llvm-svn: 186737
* Debug Info: enable verifying by default and disable testing cases that fail.Manman Ren2013-07-191-0/+2
| | | | | | | | | | | | | | | | | | | 1> Use DebugInfoFinder to find debug info MDNodes. 2> Add disable-debug-info-verifier to disable verifying debug info. 3> Disable verifying for testing cases that fail (will update the testing cases later on). 4> MDNodes generated by clang can have empty filename for TAG_inheritance and TAG_friend, so DIType::Verify is modified accordingly. Note that DebugInfoFinder does not list all debug info MDNode. For example, clang can generate: metadata !{i32 786468}, which will fail to verify. This MDNode is used by debug info but not included in DebugInfoFinder. This MDNode is generated as a temporary node in DIBuilder::createFunction Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) }; MDNode::getTemporary(VMContext, TElts) llvm-svn: 186634
* Revert "DebugInfo: remove unused helper function getDICompositeType."Eric Christopher2013-07-091-0/+11
| | | | | | | This reverts commit r185876 as the functions appear to still be used by dragonegg. llvm-svn: 185890
* DebugInfo: remove unused helper function getDICompositeType.Manman Ren2013-07-081-11/+0
| | | | llvm-svn: 185876
* DebugInfo: Consider global variables without locations to be validDavid Blaikie2013-07-041-3/+0
| | | | | | | | | | | | | | | | | We were being a bit too aggresive here in classifying global variables with no global reference or constant value to be invalid - this would cause LLVM to not emit the DWARF description of the global variable if it had been optimized away, which isn't helpful for users who might benefit from the global variable's description even if there's no location information. This also fixes a crasher issue here that I was unable to reduce a test case for - involving a using decl (& subsequent DW_TAG_imported_declaration ) of such a global variable that, once optimized away, would crash when an attempt to emit the imported declaration was made. llvm-svn: 185675
* Debug Info: Scope of a DebugLoc should not be null.Manman Ren2013-07-011-6/+3
| | | | | | No functionality change. Remove handling for the null case. llvm-svn: 185354
* Debug Info: clean up usage of Verify.Manman Ren2013-06-291-1/+3
| | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. llvm-svn: 185249
* DebugInfo: Support (using GNU extensions) for template template parameters ↵David Blaikie2013-06-221-1/+3
| | | | | | and parameter packs llvm-svn: 184643
* DebugInfo: When asm printing include a '[def]' tag for tag decls that are ↵David Blaikie2013-06-211-1/+6
| | | | | | | | | definitions (& rename the 'fwd' tag to 'decl' for clarity) This change is version locked with a change in Clang, so expect some transient buildbot fallout. llvm-svn: 184525
* Move getRealLinkageName to a common place and remove all the duplicates of it.Benjamin Kramer2013-06-011-25/+16
| | | | | | Also simplify code a bit while there. No functionality change. llvm-svn: 183076
* Simplify logic by using the appropriate functions.Adrian Prantl2013-05-291-2/+1
| | | | llvm-svn: 182869
* PR14606: Debug Info for namespace aliases/DW_TAG_imported_moduleDavid Blaikie2013-05-201-1/+2
| | | | | | | | | This resolves the last of the PR14606 failures in the GDB 7.5 test suite by implementing an optional name field for DW_TAG_imported_modules/DIImportedEntities and using that to implement C++ namespace aliases (eg: "namespace X = Y;"). llvm-svn: 182328
* PR14492: Debug Info: Support for values of non-integer non-type template ↵David Blaikie2013-05-101-0/+4
| | | | | | | | | | parameters. This is only tested for global variables at the moment (& includes tests for the unnamed parameter case, since apparently this entire function was completely untested previously) llvm-svn: 181632
* Add DebugIR pass -- emits IR file and replace source lines with IR lines in MDDaniel Malea2013-05-081-0/+7
| | | | | | | | | | | - requires existing debug information to be present - fixes up file name and line number information in metadata - emits a "<orig_filename>-debug.ll" succinct IR file (without !dbg metadata or debug intrinsics) that can be read by a debugger - initialize pass in opt tool to enable the "-debug-ir" flag - lit tests to follow llvm-svn: 181467
* Rename DIImportedModule to DIImportedEntity and allow imported declarationsDavid Blaikie2013-05-071-7/+9
| | | | | | | | | DIBuilder::createImportedDeclaration isn't fully plumbed through (note, lacking in AsmPrinter/DwarfDebug support) but this seemed like a sufficiently useful division of code to make the subsequent patch(es) easier to follow. llvm-svn: 181364
* Revert "Revert "PR14606: debug info imported_module support""David Blaikie2013-04-221-6/+27
| | | | | | | | | | This reverts commit r179840 with a fix to test/DebugInfo/two-cus-from-same-file.ll I'm not sure why that test only failed on ARM & MIPS and not X86 Linux, even though the debug info was clearly invalid on all of them, but this ought to fix it. llvm-svn: 179996
* Revert "PR14606: debug info imported_module support"Eric Christopher2013-04-191-27/+6
| | | | | | This reverts commit r179836 as it seems to have caused test failures. llvm-svn: 179840
* PR14606: debug info imported_module supportDavid Blaikie2013-04-191-6/+27
| | | | | | | | | | Adding another CU-wide list, in this case of imported_modules (since they should be relatively rare, it seemed better to add a list where each element had a "context" value, rather than add a (usually empty) list to every scope). This takes care of DW_TAG_imported_module, but to fully address PR14606 we'll need to expand this to cover DW_TAG_imported_declaration too. llvm-svn: 179836
* PR15149/r174304 improvement - print hex for unknown dwarf language codes & ↵David Blaikie2013-04-171-2/+7
| | | | | | | | add a test case CR feedback from Rafael Espindola and Paul Robinson. llvm-svn: 179664
* Revert "Adding DIImportedModules to DIScopes."David Blaikie2013-03-281-54/+33
| | | | | | | | | This reverts commit 342d92c7a0adeabc9ab00f3f0d88d739fe7da4c7. Turns out we're going with a different schema design to represent DW_TAG_imported_modules so we won't need this extra field. llvm-svn: 178215
* Fix commentDavid Blaikie2013-03-271-1/+1
| | | | llvm-svn: 178155
* Silence warning about mixing || in &&, fix up 80-cols.Benjamin Kramer2013-03-271-1/+3
| | | | llvm-svn: 178144
* Adding DIImportedModules to DIScopes.David Blaikie2013-03-271-33/+54
| | | | | | | | | | | | This is just the basic groundwork for supporting DW_TAG_imported_module but I wanted to commit this before pushing support further into Clang or LLVM so that this rather churny change is isolated from the rest of the work. The major churn here is obviously adding another field (within the common DIScope prefix) to all DIScopes (files, classes, namespaces, lexical scopes, etc). This should be the last big churny change needed for DW_TAG_imported_module/using directive support/PR14606. llvm-svn: 178099
* DebugInfo: more support for mutating DICompositeType to reduce magic number ↵David Blaikie2013-03-261-1/+8
| | | | | | usage in Clang llvm-svn: 178090
* Debug Info: Provide a means to update the members of a composite typeDavid Blaikie2013-03-261-0/+11
| | | | | | | | This will be used to factor out some uses of magic number operand offsets inside Clang where these fields were updated in an effort to resolve forward declarations/circular references. llvm-svn: 178078
* Swap the DIFile in DILexicalBlockFile out for the raw name/directory pairDavid Blaikie2013-03-221-4/+0
| | | | | | This is the last change in transitioning all DIScopes to have a common prefix. llvm-svn: 177756
* Refactor out the DIFile parameter to DILexicalBlock to refer to the raw ↵David Blaikie2013-03-221-4/+0
| | | | | | file/directory pair llvm-svn: 177742
* Refactor the filename/directory information in DISubprogram to refer ↵David Blaikie2013-03-211-4/+0
| | | | | | directly to the pair rather than the DIFile. llvm-svn: 177677
* Remove unused field in DISubprogramDavid Blaikie2013-03-211-7/+7
| | | | llvm-svn: 177661
* Debug info: refactor the first field of DICompileUnit to be a raw ↵David Blaikie2013-03-201-4/+0
| | | | | | | | file/directory pair This removes the DICompileUnit special case from DIScope. llvm-svn: 177610
* Remove unused field in DICompileUnitDavid Blaikie2013-03-201-9/+9
| | | | llvm-svn: 177590
* Refactor file/directory path in namespace debug info to refer directly to ↵David Blaikie2013-03-201-4/+0
| | | | | | | | the pair rather than the DIFile (paired to a Clang test - excuse the buildbot skew/fallout) llvm-svn: 177566
* Provide more details for DINameSpace debug info in the IR comment annotationsDavid Blaikie2013-03-201-0/+10
| | | | | | | Sorry for the version skew - I should've committed this before the corresponding Clang test case. llvm-svn: 177486
* Refactor the DIFile (2nd) parameter to DITypes to be an MDNode reference to ↵David Blaikie2013-03-201-4/+5
| | | | | | | | | a raw directory/file pair This makes DIType's first non-tag parameter the same as DIFile's, allowing them to both share the common implementation of getFilename/getDirectory in DIScope. llvm-svn: 177467
* Split out filename & directory from DIFile to start generalizing over DIScopesDavid Blaikie2013-03-171-14/+20
| | | | | | | | | | This is the first step to making all DIScopes have a common metadata prefix (so that things (using directives, for example) that can appear in any scope can be added to that common prefix). DIFile is itself a DIScope so the common prefix of all DIScopes cannot be a DIFile - instead it's the raw filename/directory name pair. llvm-svn: 177239
* Remove the unused 4th operand for DIFile debug info metadataDavid Blaikie2013-03-131-1/+1
| | | | llvm-svn: 176983
* Refactor filename/directory in DICompileUnit into a DIFileDavid Blaikie2013-03-131-9/+9
| | | | | | | This is the next step towards making the metadata for DIScopes have a common prefix rather than having to delegate based on their tag type. llvm-svn: 176913
* Remove unused "isMain" field from DICompileUnitDavid Blaikie2013-03-121-9/+9
| | | | llvm-svn: 176910
OpenPOWER on IntegriCloud