summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Stmt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ArrayRefize CXXTryStmt.Nico Weber2012-12-291-7/+6
| | | | llvm-svn: 171239
* ArrayRefize a CompoundStmt constructor.Nico Weber2012-12-291-6/+6
| | | | llvm-svn: 171238
* Fix for PR12222.Erik Verbruggen2012-12-251-62/+45
| | | | | | | | Changed getLocStart() and getLocEnd() to be required for Stmts, and make getSourceRange() optional. The default implementation for getSourceRange() is build the range by calling getLocStart() and getLocEnd(). llvm-svn: 171067
* Include pruning and general cleanup.Benjamin Kramer2012-12-011-3/+4
| | | | llvm-svn: 169095
* Pull the Attr iteration parts out of Attr.h, so including DeclBase.h doesn't ↵Benjamin Kramer2012-12-011-0/+10
| | | | | | | | | pull in all the generated Attr code. Required to pull some functions out of line, but this shouldn't have a perf impact. No functionality change. llvm-svn: 169092
* [ms-inline asm] Move some logic around to simplify the interface between theChad Rosier2012-10-161-17/+11
| | | | | | front-end and the AsmParser. No functional change intended. llvm-svn: 166063
* Revert r163083 per chandlerc's request.Joao Matos2012-09-041-11/+0
| | | | llvm-svn: 163149
* [ms-inline asm] Fix an illegal index and an 80-column violation.Chad Rosier2012-09-041-7/+7
| | | | llvm-svn: 163143
* Implemented parsing and AST support for the MS __leave exception statement. ↵Joao Matos2012-09-021-0/+11
| | | | | | Also a minor fix to __except printing in StmtPrinter.cpp. Thanks to Aaron Ballman for review. llvm-svn: 163083
* [ms-inline asm] Have generateAsmString() return the AsmString computed by Sema.Chad Rosier2012-08-281-1/+1
| | | | | | | | We still need to translate the string, but this at least gets us one step closer to using the more general EmitAsmStmt() codegen function. No functional change intended. llvm-svn: 162785
* [ms-inline asm] Add constraints to MSAsmStmt. We don't currently computeChad Rosier2012-08-281-17/+10
| | | | | | | the constraints, so in the interim we speculatively assume a 'r' constraint. This is expected to work for most cases on x86. llvm-svn: 162784
* [ms-inline asm] Use dyn_cast<> here to simplify logic.Chad Rosier2012-08-281-30/+24
| | | | llvm-svn: 162773
* [ms-inline asm] Make the AsmStmt class non-virtual.Chad Rosier2012-08-281-0/+54
| | | | llvm-svn: 162768
* [ms-inline asm] Hoist more common code into the AsmStmt base class. Add stubsChad Rosier2012-08-281-12/+25
| | | | | | with FIXMEs for unimplemented features. No functional change intended. llvm-svn: 162716
* [ms-inline asm] Add virtual function, getClobber, that returns a StringRef.Chad Rosier2012-08-271-0/+4
| | | | | | More work towards unifying asm stmt codegen. llvm-svn: 162712
* [ms-inline asm] Rename GenerateAsmString to generateAsmString to conform withChad Rosier2012-08-271-2/+9
| | | | | | | coding standards. Also, add stub for MSAsmStmt class as part of unifying codegen logic for AsmStmts. llvm-svn: 162696
* [ms-inline asm] Hoist common logic into the AsmStmt base class.Chad Rosier2012-08-271-7/+5
| | | | llvm-svn: 162692
* [ms-inline asm] Add a new base class, AsmStmt, for the GCCAsmStmt and MSAsmStmtChad Rosier2012-08-271-4/+4
| | | | | | classes. llvm-svn: 162691
* [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.Chad Rosier2012-08-251-17/+18
| | | | | | No functional change intended. llvm-svn: 162632
* [ms-inline asm] Refactor code. No functional change intended.Chad Rosier2012-08-241-0/+21
| | | | llvm-svn: 162568
* [ms-inline asm] Add the basic APIs for Exprs to the MSAsmStmt AST. Next we needChad Rosier2012-08-241-2/+23
| | | | | | generate the Input/Output expressions using Sema::ActOnIdExpression(). llvm-svn: 162509
* [ms-inline asm] Remove old cruft now that MS-style asms their own code path.Chad Rosier2012-08-201-4/+3
| | | | llvm-svn: 162210
* [ms-inline asm] Add inputs and outputs to AST. No functional change.Chad Rosier2012-08-161-6/+15
| | | | llvm-svn: 162000
* [ms-inline asm] Add the left brace source location and improve the prettyChad Rosier2012-08-151-2/+3
| | | | | | printer. Patch by Enea Zaffanella <zaffanella@cs.unipr.it>. llvm-svn: 161958
* [ms-inline asm] Remove the last bits of LineEnds.Chad Rosier2012-08-141-8/+3
| | | | llvm-svn: 161904
* [ms-inline asm] Avoid extra allocations by making this an array of StringRefs.Chad Rosier2012-08-101-2/+2
| | | | llvm-svn: 161703
* [ms-inline asm] Fix a memory leak introduced in r161686.Chad Rosier2012-08-101-4/+9
| | | | llvm-svn: 161698
* [ms-inline asm] Add clobbers to AST representation.Chad Rosier2012-08-101-2/+7
| | | | llvm-svn: 161686
* [ms-inline asm] Use StringRef here, per Jordan's suggestion.Chad Rosier2012-08-091-2/+2
| | | | llvm-svn: 161619
* [ms-inline asm] Refactor the logic to generate the AsmString into Sema. NoChad Rosier2012-08-081-2/+7
| | | | | | functional change intended. llvm-svn: 161518
* Add the IsSimple/IsVolatile parameters to the MSAsmStmt constructor.Chad Rosier2012-08-081-2/+3
| | | | llvm-svn: 161503
* Whitespace.Chad Rosier2012-08-071-36/+36
| | | | llvm-svn: 161455
* [ms-inline asm] Stmt destructors are never called, so allocate the AsmToks usingChad Rosier2012-08-071-5/+6
| | | | | | the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface. llvm-svn: 161373
* [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functionalChad Rosier2012-08-061-3/+7
| | | | | | change intended. No test case as there's no real way to test at this time. llvm-svn: 161342
* Inline storage of attributes in AttributedStmt.Alexander Kornienko2012-07-091-0/+17
| | | | llvm-svn: 159925
* Split out the "empty" case for compound statement into a separate ctor.Benjamin Kramer2012-07-041-0/+16
| | | | | | Move the ASTContext-dependent version out of line. llvm-svn: 159717
* Etch out the code path for MS-style inline assembly.Chad Rosier2012-06-111-0/+6
| | | | llvm-svn: 158325
* Add an AttributedStmt type to represent a statement with C++11 attributesRichard Smith2012-04-141-2/+4
| | | | | | | | | attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal. Patch by Alexander Kornienko! llvm-svn: 154723
* [AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().Daniel Dunbar2012-03-091-13/+13
| | | | | | | | | - getSourceRange().getBegin() is about as awesome a pattern as .copy().size(). I already killed the hot paths so this doesn't seem to impact performance on my tests-of-the-day, but it is a much more sensible (and shorter) pattern. llvm-svn: 152419
* [AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads.Daniel Dunbar2012-03-091-0/+66
| | | | | | | | - getSourceRange() can be very expensive, we should try to avoid it if at all possible. In conjunction with the previous commit I measured a ~2% speedup on 403.gcc/combine.c and a 3% speedup on OmniGroupFrameworks/NSBezierPath-OAExtensions.m. llvm-svn: 152411
* AST/stats: Don't effectively use an out-of-line function to return a staticDaniel Dunbar2012-03-051-5/+3
| | | | | | bool. Ugh. llvm-svn: 152062
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+0
| | | | llvm-svn: 148577
* Extend the Stmt AST to make it easier to look through label, default,Chandler Carruth2011-09-101-0/+16
| | | | | | | | | | | and case statements. Use this to make the logic in the CFG builder more robust at finding the actual statements within a compound statement, even when there are many layers of labels obscuring it. Also extend the test cases for a large chunk of PR10063. Still more work to do here though. llvm-svn: 139437
* Extend the ASTContext constructor to delay the initialization ofDouglas Gregor2011-09-021-1/+1
| | | | | | | | builtin types (When requested). This is another step toward making ASTUnit build the ASTContext as needed when loading an AST file, rather than doing so after the fact. No actual functionality change (yet). llvm-svn: 138985
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-6/+6
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* In ARC, reclaim all return values of retainable type, not just thoseJohn McCall2011-07-071-0/+12
| | | | | | | | | | | | where we have an immediate need of a retained value. As an exception, don't do this when the call is made as the immediate operand of a __bridge retain. This is more in the way of a workaround than an actual guarantee, so it's acceptable to be brittle here. rdar://problem/9504800 llvm-svn: 134605
* Don't overread the buffer when an %x escape in inline asm ends prematurely.Benjamin Kramer2011-07-051-0/+4
| | | | | | Tested by valgrind & Sema/asm.c. llvm-svn: 134404
* Switch the Decl and Stmt stats printing to use llvm::errs() instead ofChandler Carruth2011-07-041-8/+9
| | | | | | | fprintf, and to be more consistent in formatting with the other stats printing routines. llvm-svn: 134374
* Parsing/AST support for Structured Exception HandlingJohn Wiegley2011-04-281-0/+58
| | | | | | | | Patch authored by Sohail Somani. Provide parsing and AST support for Windows structured exception handling. llvm-svn: 130366
* Add support for C++0x's range-based for loops, as specified by the C++11 ↵Richard Smith2011-04-141-0/+34
| | | | | | draft standard (N3291). llvm-svn: 129541
OpenPOWER on IntegriCloud