History log of /external/clang/lib/Sema/SemaStmtAsm.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Sema/SemaStmtAsm.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Sema/SemaStmtAsm.cpp
942dfe2e4d75f9d7c6f2e73eadac6fa659a5f853 24-May-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happen
for labels in inline assembly that aren't in the lookup tables. E.g.,

__asm {
a:
jmp a
}

rdar://13983623


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
96c2473661be846174ffeb429fc567f6554952df 10-May-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove redundant variable


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181574 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
aeeacf725c9e0ddd64ea9764bd008e5b6873ce51 03-May-2013 John McCall <rjmccall@apple.com> Move parsing of identifiers in MS-style inline assembly into
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
734479a1638ee2573f74bfd8e1f82731e8efa683 23-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Set the OpDecl to the InlineAsmIdentifierInfo struct.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
1e7ca6211c77208c8a339c2a26e612be81c70ec5 22-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor/clean up the SemaLookup interface. No functional
change indended.
Part of rdar://13663589

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
87a9f2b2d7fb287ccd9ed5dfdbe75cc4ce906122 19-Apr-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] The parsing of C++ identifiers is a task of the front-end 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
324645a2cc058a86bc12c6a63a74da2b2590c74f 18-Apr-2013 Chad Rosier <mcrosier@apple.com> Specify that we're parsing ms-style inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
d94a3a06b7306aea0455c21abe1cadfe275469fc 02-Apr-2013 Chad Rosier <mcrosier@apple.com> Use the ASYContext::getTypeSizeInChars API to cleanup some ugliness, per John
and Jordan's suggestion. No functional change intendend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
e3faa6ec8005f34b705cef363b071b933e111e1c 01-Apr-2013 Chad Rosier <mcrosier@apple.com> Cleanup. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178481 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
d835d9496c55848981c1d9db383a0de1be160925 27-Mar-2013 Bill Wendling <isanbard@gmail.com> Pass the diagnostic in for better error messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
14df23bd114919abc374b2bcd2b2e16b79936584 25-Mar-2013 Bill Wendling <isanbard@gmail.com> Emit an error message instead of crashing when dereferencing an incomplete pointer type.

If the ASM statement is dereferencing an incomplete pointer type, issue an error
instead of crashing.
<rdar://problem/12700799>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
984f2783ad8319aa0cbfca1c4a719688b1ecfd5e 22-Mar-2013 Bill Wendling <isanbard@gmail.com> Use RequireCompleteType() instead of isIncompleteType().

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>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
d6d864fc0674039d1884e6b8d9089f40370af7d8 20-Feb-2013 Jim Grosbach <grosbach@apple.com> MCParser: Update method names per coding guidelines.

s/ParseMSInlineAsm/parseMSInlineAsm/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
ae07378ff9bf4af9bdd97a4607437ace4c32b7e7 24-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add an error when trying to compile MS-style inline assembly
for an unsupported architecture.
rdar://13063988

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
b8b5cbc169c9f6c523ada0d37dd126f7af65f3f8 17-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extend the Sema interface to get the size and length of a
VarDecl.
Part of rdar://12576868

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172742 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3973f28f347bf8ca3cca31ea30da235c95701231 10-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extend the inline asm Sema lookup interface to determine if the
Decl is a VarDecl.
Part of rdar://12991541

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172120 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
6ceb377ae4e32eeed2647aacc4a7d5c4564641bf 13-Nov-2012 Eric Christopher <echristo@gmail.com> Finish reverting r167761, it's causing test failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
5ece32e3359ca34fcdab07829f5e9fdbfd157f78 12-Nov-2012 Bill Wendling <isanbard@gmail.com> Don't test for incomplete types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167761 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
68fd608c2c0866064e974c3d43778c47c1cbb080 12-Nov-2012 Bill Wendling <isanbard@gmail.com> Check that the input size is correct for the given constraint.

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>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
50d46caf00c743312e0ea1f87a693d504b12ef51 26-Oct-2012 Bill Wendling <isanbard@gmail.com> Recommit Eric's code to validate ASM string's constraints and modifiers.

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>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166737 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
802f93736a9ae76ffcbd90dbaf1c0b185531bb30 25-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
c6cd9afd15f0f83ee07844e592d2a698416f33ca 25-Oct-2012 Bill Wendling <isanbard@gmail.com> Revert r166647 to rethink the patch...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166655 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
a0b9ce03880b7dbab766ec80817eb17a20eba508 25-Oct-2012 Bill Wendling <isanbard@gmail.com> Add some support for diagnosing possibly mismatched constraint, type size and
modifiers. (From an idea by Eric...)
<rdar://problem/12284092>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166647 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
4d5dd7c954842bc5043e45734af17db197654ca0 23-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Update for r166433.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
5f1385b81b0a6c6878ff1e35118a5b0bf52ca930 23-Oct-2012 Eli Friedman <eli.friedman@gmail.com> [ms-inline-asm] Add handling for errors coming out of the backend.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
c6f84cf73e0bc04faacd1a9b7845e014e7fac21e 20-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Move private classes into anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166377 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
793c405c28581f24543f021bd833b8c47af28ed3 19-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Set the SemaCallback in the TargetAsmParser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166310 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
cf81cd270e31f97bb88b51e24708e75cc604980e 19-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
c337d1457e4600107a1b3793f62ca96a33f1308b 18-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
which will be used by the asm matcher in the near future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
d052ebf6ca1a9ae3123a8ee22bc37e58ddb61018 18-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a
*NamedDecl. In turn, build the expressions after we're finished parsing the
asm. This avoids a crasher if the lookup fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166213 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
7fd00b153c991fbe30f9fa76391d2ad9fa1d349d 18-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move most of the AsmParsing logic in clang back into the MC
layer. Use the new ParseMSInlineAsm() API and add an implementation of the
MCAsmParserSemaCallback interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166184 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
e54cba1ec0b0e498ee67d200289035797932e714 16-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Move some logic around to simplify the interface between the
front-end and the AsmParser. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
d9b56edcf42232c5331f9ad79aae83ba31e852df 15-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rework the front-end to use the API introduced in r165946.

-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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
67bd78f1d52da57f9f44092816174ccc1d599c87 13-Oct-2012 Chad Rosier <mcrosier@apple.com> Update for r165858.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
de31b28eb7d982ed6802986c2ea94b4e955c5366 13-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove a bunch of parsing code from the front-end.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
106ddc1d320d43928ea1f36174e9d494da751ae6 13-Oct-2012 Chad Rosier <mcrosier@apple.com> Update for r165833.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
fba3fb9a14f2d729639e0fdb834e3eeb40a8a12a 12-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove a bunch of parsing code from the front-end, which will be
reimplemented in the AsmParser where it belongs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165825 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
ab210055fd33e0b050b37b4c3a248cab9154a4cb 12-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unused variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
6ec69c3f436babcdb83fd7ecb2ad722d8719bd89 12-Oct-2012 Chad Rosier <mcrosier@apple.com> Remove dead code introduced in r165751.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
90a76e54dee814ee395c4c4b40f668b9e150deb1 11-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove a bunch of parsing code from the front-end, which will be
reimplemented in the AsmParser where it belongs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165752 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
344041574a90fecc98d9412dd28767b2568eb16f 11-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove the
now unused static helper function.

The test case needs to be remove temporarily until I can better filter memory
operands that aren't actual variable reference.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165751 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3d3f1f7c79c33a2e280dd289056ce68c95aa4cce 03-Oct-2012 Chad Rosier <mcrosier@apple.com> Revert 165058, per Jim request. This requires further discussion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3329ad1dc678d0f659f5ab4f122af824477ca788 02-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rewrite the symbol references as wildcard MCParsedAsmOperands.
A Sema lookup is used to determine the size of the variable, which is in turn
used during wildcard matching.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
180d9d98fb51c7f6719d56a73bfd09400502986c 02-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Enhance the isSimpleMSAsm() function to handle operands with pointer size
directives (e.g., dword ptr [eax]).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165031 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
ef3f6ff4ece061dc3e905d656126f09883c7ae2e 02-Oct-2012 Chad Rosier <mcrosier@apple.com> No need to call the InitializeAll* functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3034d88fd128ddf164f39d4f460ae3c3d70b40ae 02-Oct-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use the convertToMapAndConstraints() function in the front-end.
Rework the logic to account for the fact that we no longer create a MCInst.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164980 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
317d8f339c2ee7b59e0e8cc81646ef664e20532d 25-Sep-2012 Bob Wilson <bob.wilson@apple.com> Examine the last, not the first, instruction from the MC matcher.

If an MS-style inline asm is matched to multiple instructions, e.g., with a
a WAIT-prefix, then we need to examine the operands of the last instruction
instruction, not the prefix instruction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
7935dde8e4dd8089536e28d51a0864252064ecd3 25-Sep-2012 Chad Rosier <mcrosier@apple.com> Update for r164567.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
b0f6b9c94077446ceb29167add2e87fb99733a55 24-Sep-2012 Bob Wilson <bob.wilson@apple.com> Replace an assertion with an error for empty __asm statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
40d39e39e46eb36635c9735381ca5c4f916d30cd 24-Sep-2012 Bob Wilson <bob.wilson@apple.com> Fix a comment typo and clean up formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3d442196134d18ed8ee17576638b758362b60742 22-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use mnemonicIsValid() in a helpful assert.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164421 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3ef95a55769278858ad586bd2b592fd50288a1ac 13-Sep-2012 Chad Rosier <mcrosier@apple.com> Add a few FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163758 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
b55e602e1dc7952edc7545fab7bb7b15047378f3 13-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Handle the enumeration of input and output expressions in a
more robust way to address a few FIXMEs.

The initial implementation, r163342, built the IR asm string and then tried to
patch things on the fly without enough context. Specifically, it didn't skip
mnemonics nor did it track with assembly instruction an expression was related
to. The new implementation patches the operands and then builds the final
IR string.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
7f9678b513f926dae27234858ed2586a6eb03b7b 12-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] If we have a single asm operand that maps to multiple
MCOperands then iterate over all of then when computing clobbers, inputs and
outputs.

On x86 the 1-to-many mapping is a memory operand that includes a BaseReg(reg),
MemScale(imm), MemIndexReg(reg), an Expr(MCExpr or imm) and a MemSegReg(reg).
Invalid register (Op.getReg() == 0) are not considered when computing clobber.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
80da77edee263ce7afb1e1320496fc3619fe12c4 12-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] isDef/NumDefs in this context only refer to register definitions, not memory definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
8742d7c84a45988b9d6e1f6ad38b2242b800c2bd 12-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As of r163657 this check is unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163665 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
fb700265b6e452a3cfd3abc73102fef11d103d4a 12-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Don't consider tokens or immediates when computing clobbers, inputs and outputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
4de971651ba09009d4a7cc6d2fbc978dd7092263 11-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add $$ before numeric constants in the IR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
c69164917460ff717fd0b02649a3d7b0c5096088 06-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Output empty asm statements for the directives we don't
handle. Otherwise, the AsmParser will explode if we try to generate an
object files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
acc22b6b5a8ba501f896fb0d00afdff5c5a3f090 06-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] The IR representation of inline assembly enumerates the input
and output expressions much like that in GNU-style inline assembly. Output
expressions are first. Do this for MS-style inline asms.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
8cdd8a9f19146582aeadae3fe38ae21ffbe3deeb 05-Sep-2012 Chad Rosier <mcrosier@apple.com> Update for r163187.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
21a37047e56d717c7979fa653c9f30aae468608d 04-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] The MCInstrDesc only tracks register definitions. For now,
assume that if the 1st operands is an expression and the instruction mayStore,
then it is a memory definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
d5eb585a02d6905b5e6f83fd03a90d583a39ac82 04-Sep-2012 Chad Rosier <mcrosier@apple.com> Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
1b497f26ab7861b22383b22f35cf799c0b312c9b 03-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Use the new GetMCInstOperandNum() interface in the front-end.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163126 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
7065c52fc53ec3106a97b7c8d373df431f3bd4f3 03-Sep-2012 Chad Rosier <mcrosier@apple.com> Removed unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
be5c3fbec3a430bab2524e9315f58f64815bfeaf 03-Sep-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Update for the MatchInstruction API change in r163101.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
b706d9027cd8bbbaffa8b359a501cba52ace4c09 29-Aug-2012 Chad Rosier <mcrosier@apple.com> Revert r162424 now that the scoping issue has been fixed in r162444.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
4112a4c001c0ffe83962e5c6755c8b3e0d74b74c 28-Aug-2012 Chad Rosier <mcrosier@apple.com> Tidy up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
89fb6d7eba51c7864ec544e07accd23b24057122 28-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add constraints to MSAsmStmt. We don't currently compute
the constraints, so in the interim we speculatively assume a 'r' constraint.
This is expected to work for most cases on x86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
df5faf5e7ae6823d0af0b801c4ac26d47f2cee97 25-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162632 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
56d7f2348a182002563700db2158da0c6fc115a5 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
32f3acc0103055b1ef171fa94d1ee6d1deb0223e 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove unnecessary calls to c_str.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
1016bdf939fd4a7b65793904610a7e647ec9d89f 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Generate the Input/Output expressions using
Sema::ActOnIdExpression().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
8a30e7735a5c2b8b105734fc9b131cc43c56d765 24-Aug-2012 Chad Rosier <mcrosier@apple.com> Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
633abb0ea01d37ab9c8e4ce1ee9e48894a12dfca 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add the basic APIs for Exprs to the MSAsmStmt AST. Next we need
generate the Input/Output expressions using Sema::ActOnIdExpression().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
5354e77e60e82828c7c2361f5c688c2667ab59cc 24-Aug-2012 Benjamin Kramer <benny.kra@googlemail.com> Now that ASTMultiPtr is nothing more than a array reference, make it a MutableArrayRef.

This required changing all get() calls to data() and using the simpler constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162501 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
25bd2986db1c7b8ced84fe835f5465007de47892 23-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Rename a few induction variables to avoid confusion and silence
a gcc warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
2d5a1de741c94f15461b06cd09a65081c7ce3d70 23-Aug-2012 Matt Beaumont-Gay <matthewbg@google.com> Don't recycle loop variables (to keep GCC happy).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
60ce584e35503af623e14eeab8fd81df9f215dcd 23-Aug-2012 Chad Rosier <mcrosier@apple.com> Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
6e97be719edb4e3b9ac15353e79c60406b3dc429 23-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Compute the inputs and outputs. No test case (yet) as this
requires codegen support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
fd5e56e35404cb44130b17546b6b5c1b33709d23 23-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Refactor code so that we can begin computing the Inputs/Outputs.
No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
682ad162f144ff8e8e5303d30bc48b6a6a41d0d6 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
358ab765f36f70d0744ede7dc35ce74c0911e77d 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162394 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
f0fbd776df77bc4b8b3e6ff3542b2e9117b2b905 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Add helper function. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162393 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
e78460f4335766b55c3da6a43fcd072671076458 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Simplify logic. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
9072a026a111726022b4f1c7f0a925d642ae8991 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Compute the token range for each instruction within the asm.
Eventually, we'll need a way of mapping tokens (and their IdentifierInfo*) to
the operands computed by buildMSAsmPieces().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
153f8ecb5169347e41a0734ee1698498d88b96c5 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Simplify logic. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
2735df2eb16acfb92b8cd24e163e3a74a7a4d950 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Start sending non-simple inline asms to the AsmParser.

The parser still can't handle all cases, so fall back to emitting a simple
MSAsmStmt if we get into trouble.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162382 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
98ac608c79fb46e73715121018f0659fb3bbe3e8 22-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the patchMSAsmStrings function. After some discussion
between Bob, Jim, Eric and I, we've decided to take a slightly different
approach.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
38c71d38e1b2a5f71c086b9c2efa9e8e69fa1bb5 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings.
Add a new static function, buildMSAsmPieces, that will break these strings down
into mnemonic and operands. Upon a match failure, the idea is to use the
ErrorInfo from MatchInstructionImpl to inspect the mnemonic/operand and
decide a course of action. Unfortunately, there's no easy way to test this at
the moment.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
51a6b3f58b0dbbc51a77b8f4a509720954406ceb 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Do not report a Parser error when matching inline assembly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162307 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
83591b6d3f20ee84f4abe1c2574e90736aa84b11 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,
this is the index of the operand that failed to match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
33a71f31af401100c8f267627ec40465029acff9 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Append identifier for better debugging.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
7fcde17284f5b18b18d858bbbc81898f58f3c296 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove this test case and the associated special case code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162288 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
df4ee102aa909e2f40c294701bfeffac63e8d29b 20-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove old cruft now that MS-style asms their own code path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
3d45a7739bae1e9c53c94ebb38c4339bd8ec0ca6 17-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Update comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162134 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp
4b5e48d39eb94ee12f3d89df60525053d8b0275e 17-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Extract AsmStmt handling into a separate file, so as to not
pollute SemaStmt with extraneous asm handling logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Sema/SemaStmtAsm.cpp