Commit Graph

20 Commits

Author SHA1 Message Date
Alexander Kornienko ab9db51042 Revert r240270 ("Fixed/added namespace ending comments using clang-tidy").
llvm-svn: 240353
2015-06-22 23:07:51 +00:00
Alexander Kornienko 3d9d929e42 Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:

  $ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
      -checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
      work/llvm/tools/clang

To reduce churn, not touching namespaces spanning less than 10 lines.

llvm-svn: 240270
2015-06-22 09:47:44 +00:00
Daniel Sanders 8d8b13dc19 Recommit r239721: Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar patches.

This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.

The first time this was committed it accidentally fixed an inconsistency in
triples in llvm-mc and this caused a failure. This inconsistency was fixed in
r239808.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D10366

llvm-svn: 239812
2015-06-16 12:18:07 +00:00
Daniel Sanders fa555dc7f8 Revert r239721 - Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
It appears to cause sparc-little-endian.s to assert on Windows and Darwin.

llvm-svn: 239724
2015-06-15 10:34:38 +00:00
Daniel Sanders d6d12a1192 Replace string GNU Triples with llvm::Triple in InitMCObjectFileInfo. NFC.
Summary:
This affects other tools so the previous C++ API has been retained as a
deprecated function for the moment. Clang has been updated with a trivial
patch (not covered by the pre-commit review) to avoid breaking -Werror builds.
Other in-tree tools will be fixed with similar trivial patches.

This continues the patch series to eliminate StringRef forms of GNU triples
from the internals of LLVM that began in r239036.

Reviewers: rengolin

Reviewed By: rengolin

Subscribers: llvm-commits, rengolin

Differential Revision: http://reviews.llvm.org/D10366

llvm-svn: 239721
2015-06-15 09:19:41 +00:00
Steven Wu 18bbe191cd Allow empty assembly string literal with -fno-gnu-inline-asm
Empty assembly string will not introduce assembly code in the output
binary and it is often used as a trick in the header to disable
optimizations. It doesn't conflict with the purpose of the option so it
is allowed with -fno-gnu-inline-asm flag.

llvm-svn: 237073
2015-05-12 00:16:37 +00:00
Eric Christopher 7e0fadf837 Update for llvm commit r233648.
llvm-svn: 233649
2015-03-31 00:10:23 +00:00
Steven Wu cb0d13fc23 Adding option -fno-inline-asm to disallow inline asm
Summary:
This patch add a new option to dis-allow all inline asm.
Any GCC style inline asm will be reported as an error.

Reviewers: rnk, echristo

Reviewed By: rnk, echristo

Subscribers: bob.wilson, rnk, echristo, rsmith, cfe-commits

Differential Revision: http://reviews.llvm.org/D6870

llvm-svn: 226340
2015-01-16 23:05:28 +00:00
Kaelyn Takata 1586782767 Enable ActOnIdExpression to use delayed typo correction for non-C++ code
when calling DiagnoseEmptyLookup.

llvm-svn: 222551
2014-11-21 18:48:04 +00:00
Benjamin Kramer de952d1180 Initialize MCObjectFileInfo when parsing ms-style asm.
Otherwise we're left with an half-initialized bag of variables that may or may
not explode later on. Should bring the MSVC buildbot back to life.

llvm-svn: 219023
2014-10-03 21:48:23 +00:00
Ehsan Akhgari 31097581aa ms-inline-asm: Scope inline asm labels to functions
Summary:
This fixes PR20023.  In order to implement this scoping rule, we piggy
back on the existing LabelDecl machinery, by creating LabelDecl's that
will carry the "internal" name of the inline assembly label, which we
will rewrite the asm label to.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4589

llvm-svn: 218230
2014-09-22 02:21:54 +00:00
Rafael Espindola d87f8d76e0 Update for LLVM api change.
llvm-svn: 216585
2014-08-27 20:03:29 +00:00
David Blaikie 9e095d9b6b Update Clang for LLVM API change to use unique_ptr in SourceManager::AddNewSourceBuffer
llvm-svn: 216226
2014-08-21 21:01:00 +00:00
Ehsan Akhgari 2f93b448a8 clang-cl: Merge adjacent single-line __asm blocks
Summary:
This patch extends the __asm parser to make it keep parsing input tokens
as inline assembly if a single-line __asm line is followed by another line
starting with __asm too.  It also makes sure that we correctly keep
matching braces in such situations by separating the notions of how many
braces we are matching and whether we are in single-line asm block mode.

Reviewers: rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4598

llvm-svn: 213916
2014-07-25 02:27:14 +00:00
Aaron Ballman 08b065909f Disallowing GNU-style attributes in new expressions, since they are prohibited by GCC as well.
llvm-svn: 213650
2014-07-22 12:44:22 +00:00
Nico Weber 022e507042 Wrap a comment to 80 columns, no code change.
llvm-svn: 213288
2014-07-17 18:19:30 +00:00
Ehsan Akhgari 833ed943d6 Don't get confused on the number of braces when braces start after the first __asm
Summary:
Without this, we would not consume the closing brace which would cause
the parser to start consuming C++ and bad things would happen.

Reviewers: majnemer

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D4505

llvm-svn: 213032
2014-07-15 02:21:41 +00:00
Ehsan Akhgari 0f89fac7a5 Add support for nested blocks in Microsoft inline assembly
This fixes http://llvm.org/PR20204.

llvm-svn: 212389
2014-07-06 05:26:54 +00:00
David Majnemer 05c69866a8 Parse: Simplify construction of the clobber list
This avoids going over the clobber list twice.

No functionality change.

llvm-svn: 211485
2014-06-23 02:16:41 +00:00
Alp Toker 1b935a88d5 Split out inline asm parsing into ParseStmtAsm.cpp
This change isolates various llvm/MC headers from the rest of the parser and
better aligns with the existing SemaStmtAsm.cpp.

No change in functionality, code move only.

llvm-svn: 210420
2014-06-08 05:40:04 +00:00