summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmtAsm.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [AArch64, inline-asm] Improve diagnostic that is printed when the size of aAkira Hatanaka2014-08-221-3/+14
| | | | | | | | | | | | | | | | | variable that has regiser constraint "r" is not 64-bit. General register operands are output using 64-bit "x" register names, regardless of the size of the variable, unless the asm operand is prefixed with the "%w" modifier. This surprises and confuses many users who aren't familiar with aarch64 inline assembly rules. With this commit, a note and fixit hint are printed which tell the users that they need modifier "%w" in order to output a "w" register instead of an "x" register. <rdar://problem/12764785> llvm-svn: 216260
* CodeGen: Let arrays be inputs to inline asmDavid Majnemer2014-07-141-5/+6
| | | | | | | | | | | An array showing up in an inline assembly input is accepted in ICC and GCC 4.8 This fixes PR20201. Differential Revision: http://reviews.llvm.org/D4382 llvm-svn: 212954
* Don't include llvm/MC/MCParser throughout all of SemaAlp Toker2014-06-081-1/+2
| | | | | | Requires LLVM r210417. llvm-svn: 210418
* Refactoring. Remove Owned method from Sema.Nikola Smiljanic2014-05-291-2/+2
| | | | llvm-svn: 209812
* Refactoring. Remove release and take methods from ActionResult. Rename ↵Nikola Smiljanic2014-05-291-3/+3
| | | | | | takeAs to getAs. llvm-svn: 209800
* [C++11] Use 'nullptr'. Sema edition.Craig Topper2014-05-261-2/+2
| | | | llvm-svn: 209613
* Support field references to struct names and c++11 aliases from inline asm.Nico Weber2014-05-061-1/+3
| | | | | | This is in addition to the existing support for typedefs. llvm-svn: 208053
* Fix a bunch of mislayered clang/Lex includes from SemaAlp Toker2014-05-031-1/+0
| | | | llvm-svn: 207896
* [ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happenChad Rosier2013-05-241-1/+3
| | | | | | | | | | | | | for labels in inline assembly that aren't in the lookup tables. E.g., __asm { a: jmp a } rdar://13983623 llvm-svn: 182659
* Remove redundant variableDmitri Gribenko2013-05-101-4/+3
| | | | llvm-svn: 181574
* Move parsing of identifiers in MS-style inline assembly intoJohn McCall2013-05-031-285/+47
| | | | | | | | | | | | | | | | | | | | | the actual parser and support arbitrary id-expressions. We're actually basically set up to do arbitrary expressions here if we wanted to. Assembly operands permit things like A::x to be written regardless of language mode, which forces us to embellish the evaluation context logic somewhat. The logic here under template instantiation is incorrect; we need to preserve the fact that an expression was unevaluated. Of course, template instantiation in general is fishy here because we have no way of delaying semantic analysis in the MC parser. It's all just fishy. I've also fixed the serialization of MS asm statements. This commit depends on an LLVM commit. llvm-svn: 180976
* [ms-inline asm] Set the OpDecl to the InlineAsmIdentifierInfo struct.Chad Rosier2013-04-221-0/+1
| | | | | | Part of rdar://13663589 llvm-svn: 180055
* [ms-inline asm] Refactor/clean up the SemaLookup interface. No functionalChad Rosier2013-04-221-23/+13
| | | | | | | change indended. Part of rdar://13663589 llvm-svn: 180027
* [ms-inline asm] The parsing of C++ identifiers is a task of the front-end ↵Chad Rosier2013-04-191-0/+31
| | | | | | | | | | parser, not the asm parser. As such, begin moving the parsing logic in that direction. This patch is just a temporary hack until the real frontend parser can be hooked up. Part of rdar://13663589 llvm-svn: 179882
* Specify that we're parsing ms-style inline assembly.Chad Rosier2013-04-181-1/+1
| | | | llvm-svn: 179762
* Use the ASYContext::getTypeSizeInChars API to cleanup some ugliness, per JohnChad Rosier2013-04-011-5/+3
| | | | | | and Jordan's suggestion. No functional change intendend. llvm-svn: 178507
* Cleanup. No functional change intended.Chad Rosier2013-04-011-18/+17
| | | | llvm-svn: 178481
* Pass the diagnostic in for better error messages.Bill Wendling2013-03-271-8/+6
| | | | llvm-svn: 178120
* Emit an error message instead of crashing when dereferencing an incomplete ↵Bill Wendling2013-03-251-7/+15
| | | | | | | | | | pointer type. If the ASM statement is dereferencing an incomplete pointer type, issue an error instead of crashing. <rdar://problem/12700799> llvm-svn: 177915
* Use RequireCompleteType() instead of isIncompleteType().Bill Wendling2013-03-221-1/+3
| | | | | | | | | | | | isIncompleteType() returns true or false for template types depending on whether the type is instantiated yet. In this context, that's arbitrary. The better way to check for a complete type is RequireCompleteType(). Thanks to Eli Friedman for noticing this! <rdar://problem/12700799> llvm-svn: 177768
* MCParser: Update method names per coding guidelines.Jim Grosbach2013-02-201-1/+1
| | | | | | s/ParseMSInlineAsm/parseMSInlineAsm/ llvm-svn: 175680
* [ms-inline asm] Add an error when trying to compile MS-style inline assemblyChad Rosier2013-01-241-2/+9
| | | | | | | for an unsupported architecture. rdar://13063988 llvm-svn: 173364
* [ms-inline asm] Extend the Sema interface to get the size and length of aChad Rosier2013-01-171-5/+19
| | | | | | | VarDecl. Part of rdar://12576868 llvm-svn: 172742
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-2/+2
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* [ms-inline asm] Extend the inline asm Sema lookup interface to determine if theChad Rosier2013-01-101-6/+10
| | | | | | | Decl is a VarDecl. Part of rdar://12991541 llvm-svn: 172120
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-6/+6
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Finish reverting r167761, it's causing test failures.Eric Christopher2012-11-121-0/+3
| | | | llvm-svn: 167777
* Don't test for incomplete types.Bill Wendling2012-11-121-3/+0
| | | | llvm-svn: 167761
* Check that the input size is correct for the given constraint.Bill Wendling2012-11-121-0/+11
| | | | | | | | | The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register. We cannot place a 64-bit value into the 32-bit register. Error out instead of causing the compiler to spew general badness. <rdar://problem/12415959> llvm-svn: 167717
* Recommit Eric's code to validate ASM string's constraints and modifiers.Bill Wendling2012-10-251-0/+48
| | | | | | | | | | | | | This code checks the ASM string to see if the output size is able to fit within the variable specified as the output. For instance, scalar-to-vector conversions may not really work. It's on by default, but can be turned off with a flag if you think you know what you're doing. This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm'). <rdar://problem/12284092> llvm-svn: 166737
* [ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.Chad Rosier2012-10-251-0/+50
| | | | llvm-svn: 166723
* Revert r166647 to rethink the patch...Bill Wendling2012-10-251-48/+0
| | | | llvm-svn: 166655
* Add some support for diagnosing possibly mismatched constraint, type size andBill Wendling2012-10-251-0/+48
| | | | | | | modifiers. (From an idea by Eric...) <rdar://problem/12284092> llvm-svn: 166647
* [ms-inline asm] Update for r166433.Chad Rosier2012-10-231-3/+8
| | | | llvm-svn: 166489
* [ms-inline-asm] Add handling for errors coming out of the backend.Eli Friedman2012-10-231-5/+46
| | | | llvm-svn: 166463
* Move private classes into anonymous namespaces.Benjamin Kramer2012-10-201-0/+4
| | | | llvm-svn: 166377
* [ms-inline asm] Set the SemaCallback in the TargetAsmParser.Chad Rosier2012-10-191-1/+3
| | | | llvm-svn: 166310
* [ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.Chad Rosier2012-10-191-0/+1
| | | | llvm-svn: 166293
* [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,Chad Rosier2012-10-181-3/+8
| | | | | | which will be used by the asm matcher in the near future. llvm-svn: 166221
* [ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return aChad Rosier2012-10-181-19/+17
| | | | | | | *NamedDecl. In turn, build the expressions after we're finished parsing the asm. This avoids a crasher if the lookup fails. llvm-svn: 166213
* [ms-inline asm] Move most of the AsmParsing logic in clang back into the MCChad Rosier2012-10-181-180/+81
| | | | | | | layer. Use the new ParseMSInlineAsm() API and add an implementation of the MCAsmParserSemaCallback interface. llvm-svn: 166184
* [ms-inline asm] Move some logic around to simplify the interface between theChad Rosier2012-10-161-18/+32
| | | | | | front-end and the AsmParser. No functional change intended. llvm-svn: 166063
* [ms-inline asm] Rework the front-end to use the API introduced in r165946.Chad Rosier2012-10-151-217/+179
| | | | | | | | | | | | | | | | | | | -The front-end now builds a single assembly string and feeds it to the AsmParser. The front-end iterates on a per statement basis by calling the ParseStatement() function. Please note, the calling of ParseStatement() and and any notion of MCAsmParsedOperands will be sunk into the MC layer in the near future. I plan to expose more basic APIs such as getClobbers, etc. -The enumeration of the AsmString expressions have been reworked to use SMLocs rather than assembly Pieces, which were being parsed in the front-end. -The test case, t8(), was modified due to r129223. I'll have to find a way to work around things such as these. Sorry for the large commit, but breaking this in multiple smaller commits proved too irritating. llvm-svn: 165957
* Update for r165858.Chad Rosier2012-10-131-3/+4
| | | | llvm-svn: 165859
* [ms-inline asm] Remove a bunch of parsing code from the front-end.Chad Rosier2012-10-121-21/+1
| | | | llvm-svn: 165851
* Update for r165833.Chad Rosier2012-10-121-9/+5
| | | | llvm-svn: 165834
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-121-33/+0
| | | | | | reimplemented in the AsmParser where it belongs. llvm-svn: 165825
* Remove unused variable.Benjamin Kramer2012-10-121-2/+0
| | | | llvm-svn: 165793
* Remove dead code introduced in r165751.Chad Rosier2012-10-121-6/+2
| | | | llvm-svn: 165772
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-111-71/+2
| | | | | | reimplemented in the AsmParser where it belongs. llvm-svn: 165752
OpenPOWER on IntegriCloud