summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LexicalScopes.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Recommit r208506: DebugInfo: Include lexical scopes in inlined subroutines.David Blaikie2014-05-141-12/+27
| | | | | | | | | | | | | | | | | | | | This was reverted in r208642 due to regressions surrounding file changes within lexical scopes causing inlining information to be lost. The issue was in LexicalScopes::getOrCreateInlinedScope, where I was previously testing "isLexicalBlock" which is false for "DILexicalBlockFile" (a scope used to represent changes in the current file name) and assuming it was then a function (breaking out of the inlined scope path and reaching for the parent non-inlined scopes). By inverting the condition and testing for "isSubprogram" the correct behavior is attained. (also found some weirdness in Clang, see r208742 when reducing this test case - the resulting test case doesn't apply with the Clang fix, but I've added a more realistic test case to inline-scopes.ll which does reproduce the issue and demonstrate the fix) llvm-svn: 208748
* Revert "DebugInfo: Include lexical scopes in inlined subroutines."David Blaikie2014-05-121-28/+12
| | | | | | | | | This reverts commit r208506. Some inlined subroutine scopes appear to be missing with this change. Reverting while I investigate. llvm-svn: 208642
* DebugInfo: Include lexical scopes in inlined subroutines.David Blaikie2014-05-111-12/+28
| | | | llvm-svn: 208506
* Reapply r207876 (Try simplifying LexicalScopes ownership again) including a ↵David Blaikie2014-05-081-28/+35
| | | | | | | | | | | | | | | | | | | workaround for an MSVC2012 bug regarding forward_as_tuple (r207876 was reverted in r208131 after seeing some consistent buildbot failure for MSVC 2012. The original commits were in r207724-r207726) Takumi was nice enough to dig into this and locate this Microsoft Connect issue: http://connect.microsoft.com/VisualStudio/feedback/details/814899/forward-as-tuple-debug-implementation-error describing a bug in MSVC2012's forward_as_tuple implementation. Since the parameters in this instance are trivial/small, pass them by value (using make_tuple) instead of perfectly-forwarded tuple of rvalue references (involving the broken forward_as_tuple). Hopefully this will satisfy MSVC2012. llvm-svn: 208364
* Revert "Try simplifying LexicalScopes ownership again."David Blaikie2014-05-061-32/+28
| | | | | | | | | Speculatively reverting due to a suspicious failure on a Windows buildbot. This reverts commit 10c37a012ea11596d44cd9059fe09c959caf30c8. llvm-svn: 208131
* Try simplifying LexicalScopes ownership again.David Blaikie2014-05-021-28/+32
| | | | | | | | | | | | | | Committed initially in r207724-r207726 and reverted due to compiler-rt crashes in r207732. Instead, fix this harder with unordered_map and store the LexicalScopes by value in the map. This did necessitate moving the definition of LexicalScope above the definition of LexicalScopes. Let's see how the buildbots/compilers tolerate unordered_map::emplace + std::piecewise_construct + std::forward_as_tuple... llvm-svn: 207876
* Speculatively roll back r207724-r207726, which are code cleanup changes andRichard Smith2014-05-011-30/+25
| | | | | | appear to be breaking a bootstrapped build of compiler-rt. llvm-svn: 207732
* LexicalScopes: Use unique_ptr to manage ownership of abstract LexicalScopes.David Blaikie2014-04-301-8/+9
| | | | llvm-svn: 207726
* Forgotten reformatting.David Blaikie2014-04-301-5/+9
| | | | llvm-svn: 207725
* LexicalScopes: use unique_ptr to own LexicalScope objects.David Blaikie2014-04-301-16/+16
| | | | | | Ownership of abstract scopes coming soon. llvm-svn: 207724
* Convert more loops to range-based equivalentsAlexey Samsonov2014-04-301-10/+7
| | | | llvm-svn: 207714
* Convert several loops over MachineFunction basic blocks to range-based loopsAlexey Samsonov2014-04-301-6/+4
| | | | llvm-svn: 207683
* [Modules] Remove potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | | | | | | | define below all header includes in the lib/CodeGen/... tree. While the current modules implementation doesn't check for this kind of ODR violation yet, it is likely to grow support for it in the future. It also removes one layer of macro pollution across all the included headers. Other sub-trees will follow. llvm-svn: 206837
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-141-14/+14
| | | | | | instead of comparing to nullptr. llvm-svn: 206142
* [Layering] Move DebugInfo.h into the IR library where its implementationChandler Carruth2014-03-061-1/+1
| | | | | | already lives. llvm-svn: 203046
* Remove capability for polymorphic destruction from LexicalScopeEric Christopher2013-11-201-6/+5
| | | | | | and LexicalScopes, we're not using it. llvm-svn: 195182
* Formatting, 80-col, trailing whitespace.Eric Christopher2013-11-201-37/+36
| | | | llvm-svn: 195180
* typo.Adrian Prantl2013-07-251-1/+1
| | | | llvm-svn: 187135
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-2/+2
| | | | | | specifying the vector size. llvm-svn: 185509
* Return SmallVectorImpl& instead of SmallVector& in a couple places to avoid ↵Craig Topper2013-07-031-2/+2
| | | | | | having to specify the vector size in multiple places. llvm-svn: 185507
* Correct indentation for dumping LexicalScope.Manman Ren2013-02-021-8/+6
| | | | llvm-svn: 174237
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-281-1/+1
| | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. llvm-svn: 159312
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+2
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Don't forget to reconstruct D after changing the scope that we'reEric Christopher2011-10-131-1/+3
| | | | | | looking at. llvm-svn: 141892
* Add a new wrapper node for a DILexicalBlock that encapsulates it and aEric Christopher2011-10-111-3/+17
| | | | | | | | | | | | | file. Since it should only be used when necessary propagate it through the backend code generation and tweak testcases accordingly. This helps with code like in clang's test/CodeGen/debug-info-line.c where we have multiple #line directives within a single lexical block and want to generate only a single block that contains each file change. Part of rdar://10246360 llvm-svn: 141729
* Provide fast path as Jakob suggested.Devang Patel2011-08-121-0/+12
| | | | llvm-svn: 137478
* Stay within 80 columns.Devang Patel2011-08-101-4/+6
| | | | llvm-svn: 137283
* Provide utility to extract and use lexical scoping information from machine ↵Devang Patel2011-08-101-0/+305
instructions. llvm-svn: 137237
OpenPOWER on IntegriCloud