History log of /external/clang/lib/Frontend/PrintPreprocessedOutput.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/Frontend/PrintPreprocessedOutput.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
26297f57634994b4ae47a0774c372d6944265bb2 15-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> When we hit a #include directive that maps to a module import, emit a token
representing the module import rather than making the module immediately
visible. This serves two goals:
* It avoids making declarations in the module visible prematurely, if we
walk past the #include during a tentative parse, for instance, and
* It gives a diagnostic (although, admittedly, not a very nice one) if
a header with a corresponding module is included anywhere other than
at the top level.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
72c26c0d47eb850db18b784403260bce0632c478 02-Oct-2013 Reid Kleckner <reid@kleckner.net> Accept #pragma warning(push, 0) without warning

This partially addresses PR17435, but it doesn't actually implement the
pragma. If we implement it, we should map levels 1-4 to something like
-Wall and level 0 to something like -w.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191833 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
767b3d2000a00c56e1a3c19372810e2b7d66b76c 22-Sep-2013 Benjamin Kramer <benny.kra@googlemail.com> Fix array_pod_sort predicates after LLVM change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
2ee042dee9f7693665e28463955401905474a284 14-Sep-2013 Reid Kleckner <reid@kleckner.net> Lex and ignore Microsoft's #pragma warning(...)

Summary:
This fixes PR17145 and avoids unknown pragma warnings.

This change does not attempt to map MSVC warning numbers to clang
warning flags. Perhaps in the future we will implement a mapping for
some common subset of Microsoft warnings, but for now we don't.

Reviewers: rsmith

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1652

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
3432b7800d447267f4353e70a319f6f5a0bb4aab 29-Aug-2013 Eli Friedman <eli.friedman@gmail.com> Properly escape filenames in line directives.

Fixes PR17018. Only partial test coverage because I don't want
to try to write a test which generates a file whose name contains a newline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
a7ff62f9443efa3b13a28a1e566d4625b15b8553 04-Jun-2013 Aaron Ballman <aaron@aaronballman.com> Adding support for MSVC #pragma detect_mismatch functionality by emitting a FAILIFMISMATCH linker command into the object file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
56f6e09562568437e852eba192c17869beba1d49 29-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> When emitting a preprocessed file with implicit module imports, make sure line directives are emitted in the next line.

rdar://13722737

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
f5ae4dd6bf2310fbf4b192137aecd21248a08449 19-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Keep the parentheses in #pragma message (partial revert of r179771).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
688f2a1fc1ac38e8b7b602ab8afc69cdfa7492bf 18-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Dropped the parentheses for #pragma message and its kin in the -E output generator.

This was a suggestion by Jordan Rose since the documented format for these pragmas is without the parentheses. At the same time, I've increased test coverage too for the preprocessed output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
142b35e25b579e2a883d6ca37c3c1121f562f242 17-Apr-2013 Jordan Rose <jordan_rose@apple.com> Fix off-by-one error in #pragma clang system_header.

The system_header pragma (from GCC) is implemented using line notes in the
source manager. However, a line note's line number specifies the number
not for the current line, but for the next line. This was making all
line numbers appear off by one after the pragma.

Reported by Andy Gibbs, uncovered during r179677.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179709 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
076eea20b80024fc63bbd71fb019375983680ea6 17-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Implemented #pragma GCC warning/error in the same mould as #pragma message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179687 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
6afcf8875d4e447645cd7bf3733dd8e2eb8455dc 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Sema for Captured Statements

Add CapturedDecl to be the DeclContext for CapturedStmt, and perform semantic
analysis. Currently captures all variables by reference.

TODO: templates

Author: Ben Langmuir <ben.langmuir@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D433


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
85192c7fe187d5486e12dbc6960af28f16a558a0 16-Apr-2013 Tareq A. Siraj <tareq.a.sriaj@intel.com> Parser support for #pragma clang __debug captured

This patch implements parsing ‘#pragma clang __debug’ as a first step for
implementing captured statements. Captured statements are a mechanism for
doing outlining in the AST.
see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-January/027540.html.

Currently returns StmtEmpty

Author: Andy Zhang <andy.zhang@intel.com>

Differential Revision: http://llvm-reviews.chandlerc.com/D369


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
15aa81a4746697311f71f5802ce27c7dc98b2ff3 10-Apr-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [frontend] When preprocessing, turn implicit module imports into @imports.

part of rdar://13610250

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
c56fff7fd231aebf4b152f60f8f11ef91835c48a 26-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [Preprocessor/Modules] Separate the macro directives kinds into their own MacroDirective's subclasses.

For each macro directive (define, undefine, visibility) have a separate object that gets chained
to the macro directive history. This has several benefits:

-No need to mutate a MacroDirective when there is a undefine/visibility directive. Stuff like
PPMutationListener become unnecessary.
-No need to keep extra source locations for the undef/visibility locations for the define directive object
(which is the majority of the directives)
-Much easier to hide/unhide a section in the macro directive history.
-Easier to track the effects of the directives across different submodules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
cf2c2e9588a12a716615850cc5bfacd9b20f68ef 06-Mar-2013 Jordan Rose <jordan_rose@apple.com> Preprocessor: don't keep comments under -traditional-cpp.

This patch is designed for minimal intrusion into normal preprocessing
and compilation; under -E -traditional-cpp, the lexer will still
generate tok::comment nodes since it is preserving all whitespace, but
the output printer will then throw it away.

<rdar://problem/13338680>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
c515978bd3a703aa733f846a0094ffa84d149074 24-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
6aad4a31b35df07fe818f193fcfd3c0197aea467 21-Feb-2013 Jordan Rose <jordan_rose@apple.com> Preprocessor: preserve whitespace in -traditional-cpp mode.

Note that unlike GNU cpp we currently do not preserve whitespace in macros
(even in -traditional-cpp mode).

<rdar://problem/12897179>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
9818a1d443e97677dd3422305de9cc2b1fb2a8c1 20-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [preprocessor] Split the MacroInfo class into two separate concepts, MacroInfo class
for the data specific to a macro definition (e.g. what the tokens are), and
MacroDirective class which encapsulates the changes to the "macro namespace"
(e.g. the location where the macro name became active, the location where it was undefined, etc.)

(A MacroDirective always points to a MacroInfo object.)

Usually a macro definition (MacroInfo) is where a macro name becomes active (MacroDirective) but
splitting the concepts allows us to better model the effect of modules to the macro namespace
(also as a bonus it allows better modeling of push_macro/pop_macro #pragmas).
Modules can have their own macro history, separate from the local (current translation unit)
macro history; MacroDirectives will be used to model the macro history (changes to macro namespace).

For example, if "@import A;" imports macro FOO, there will be a new local MacroDirective created
to indicate that "FOO" became active at the import location. Module "A" itself will contain another
MacroDirective in its macro history (at the point of the definition of FOO) and both MacroDirectives
will point to the same MacroInfo object.

Introducing the separation of macro concepts is the first part towards better modeling of module macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175585 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
3f6f51e28231f65de9c2dd150a2d757b2162cfa3 08-Feb-2013 Jordan Rose <jordan_rose@apple.com> Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.

Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
43bb45d152b14e186689e159ac9be2e27787d5ac 28-Jan-2013 Hal Finkel <hfinkel@anl.gov> Fix the indentation of the first line of preprocessor output

The -E output from clang did not produce the correct indentation on the first line.
This is because MoveToLine returned false, and when this happens,
the regular process for producing initial indentation is skipped.

Thanks to Eli for suggesting a way to simplify this to a one-line change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173657 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
b3958476b21702a15f64f09d2862506d03dffe7b 14-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Constify argument of Preprocessor::getMacroInfoHistory and propagate to
callers, removing unneeded const_cast


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
086cc83a84bfab60685b69e3afa3e4500daebb4d 09-Jan-2013 Eli Friedman <eli.friedman@gmail.com> Make sure clang puts tokens from different files on separate lines in "-E -P" mode. <rdar://problem/12774044>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.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/Frontend/PrintPreprocessedOutput.cpp
2a9be3e5b0c390f9189bb3dec2b2b6ba884f60cc 16-Nov-2012 Daniel Dunbar <daniel@zuster.org> CPP Output: Do not emit an enter file marker for the main file.

- This diverges from gcc, and confuses tools (like dtrace) which track # line
markers as a way to determine which content is in the context of the main
file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
8a64bb58c3b24d7d97895e435bbc0965c99bd3be 29-Aug-2012 Alexander Kornienko <alexfh@google.com> Keep history of macro definitions and #undefs

Summary:
Summary: Keep history of macro definitions and #undefs with corresponding source locations, so that we can later find out all macros active in a specified source location. We don't save the history in PCH (no need currently). Memory overhead is about sizeof(void*)*3*<number of macro definitions and #undefs>+<in-memory size of all #undef'd macros>

I've run a test on a file composed of 109 .h files from boost 1.49 on x86-64 linux.
Stats before this patch:
*** Preprocessor Stats:
73222 directives found:
19171 #define.
4345 #undef.
#include/#include_next/#import:
5233 source files entered.
27 max include stack depth
19210 #if/#ifndef/#ifdef.
2384 #else/#elif.
6891 #endif.
408 #pragma.
14466 #if/#ifndef#ifdef regions skipped
80023/451669/1270 obj/fn/builtin macros expanded, 85724 on the fast path.
127145 token paste (##) operations performed, 11008 on the fast path.

Preprocessor Memory: 5874615B total
BumpPtr: 4399104
Macro Expanded Tokens: 417768
Predefines Buffer: 8135
Macros: 1048576
#pragma push_macro Info: 0
Poison Reasons: 1024
Comment Handlers: 8

Stats with this patch:
...
Preprocessor Memory: 7541687B total
BumpPtr: 6066176
Macro Expanded Tokens: 417768
Predefines Buffer: 8135
Macros: 1048576
#pragma push_macro Info: 0
Poison Reasons: 1024
Comment Handlers: 8

In my test increase in memory usage is about 1.7Mb, which is ~28% of initial preprocessor's memory usage and about 0.8% of clang's total VMM allocation.

As for CPU overhead, it should only be noticeable when iterating over all macros, and should mostly consist of couple extra dereferences and one comparison per macro + skipping of #undef'd macros. It's less trivial to measure, though, as the preprocessor consumes a very small fraction of compilation time.


Reviewers: doug.gregor, klimek, rsmith, djasper

Reviewed By: doug.gregor

CC: cfe-commits, chandlerc

Differential Revision: http://llvm-reviews.chandlerc.com/D28

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
7094dee95f8c915d27097ac18b47d1ef31fd72ed 10-Aug-2012 Joerg Sonnenberger <joerg@bec.de> Add missing cctype includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
0cdd1fe3ec29b5cbff9a728966ace5c5b5d614f7 16-Jun-2012 Jordan Rose <jordan_rose@apple.com> [-E] Emit a rewritten _Pragma on its own line.

1. Teach Lexer that pragma lexers are like macro expansions at EOF.
2. Treat pragmas like #define/#undef when printing.
3. If we just printed a directive, add a newline before any more tokens.
(4. Miscellaneous cleanup in PrintPreprocessedOutput.cpp)

PR10594 and <rdar://problem/11562490> (two separate related problems)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158571 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
4e4d08403ca5cfd4d558fa2936215d3a4e5a528d 11-Mar-2012 David Blaikie <dblaikie@gmail.com> Unify naming of LangOptions variable/get function across the Clang stack (Lex to AST).

The member variable is always "LangOpts" and the member function is always "getLangOpts".

Reviewed by Chris Lattner

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
d7a3e2c5f61cd4893f95b69a424fe4def3aa0f69 07-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Revert my patches which removed Diagnostic.h includes by moving some operator overloads out of line.

This seems to negatively affect compile time onsome ObjC tests
(which use a lot of partial diagnostics I assume). I have to come
up with a way to keep them inline without including Diagnostic.h
everywhere. Now adding a new diagnostic requires a full rebuild
of e.g. the static analyzer which doesn't even use those diagnostics.

This reverts commit 6496bd10dc3a6d5e3266348f08b6e35f8184bc99.
This reverts commit 7af19b817ba964ac560b50c1ed6183235f699789.
This reverts commit fdd15602a42bbe26185978ef1e17019f6d969aa7.
This reverts commit 00bd44d5677783527d7517c1ffe45e4d75a0f56f.
This reverts commit ef9b60ffed980864a8db26ad30344be429e58ff5.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
fdd15602a42bbe26185978ef1e17019f6d969aa7 04-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Remove Diagnostic.h include from Preprocessor.h.

- Move the offending methods out of line and fix transitive includers.
- This required changing an enum in the PPCallback API into an unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149782 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
1770e0dadcab966990cca4d7516253c886fd907c 22-Dec-2011 Dylan Noblesmith <nobled@dreamwidth.org> remove unneeded config.h includes



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147195 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
c892c5fa92db137ff68d95afb13fe969d17f4fb2 11-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
62ec1f2fd7368542bb926c04797fb07023547694 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
a77c031cb66f75d22672070052cc6e0205289ff8 25-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Rename getInstantiationColumnNumber to getExpansionColumnNumber in both
SourceManager and FullSourceLoc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
9f79a1f89695a79d5e29a72c28ffb59823b31cef 14-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Update the remaining comments in Frontend to 'expansion'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135150 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
c09ce1224dedc470fce9747e5936ff83cc6762eb 22-Jun-2011 Douglas Gregor <dgregor@apple.com> Copy diagnostic pragmas to the preprocessed output, from Richard Osborne!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
84021556baceb76eedf7d44be8ba71d9b8cfacce 28-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> Rename tok::eom to tok::eod.

The previous name was inaccurate as this token in fact appears at
the end of every preprocessing directive, not just macro definitions.
No functionality change, except for a diagnostic tweak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126631 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
eef63e0997e0f6d6436736ea919b851cfe34955a 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Factor out header include dumping (-H) into its own preprocessor
callbacks class.
- Aside from being generally cleaner, this also allows -H to work correctly in
modes other than standard preprocessing (e.g., -c, -MM, etc.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
2aa9267cf193e5eceb9fd24a51b51c031b606fe9 19-Nov-2010 Craig Silverstein <csilvers2000@yahoo.com> Several PPCallbacks take an SourceLocation + IdentifierInfo, rather
than a Token that holds the same information all in one easy-to-use
package. There's no technical reason to prefer the former -- the
information comes from a Token originally -- and it's clumsier to use,
so I've changed the code to use tokens everywhere.

Approved by clattner


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
cb7b1e17b63967317ab5cc55682168cf0380519a 12-Nov-2010 Douglas Gregor <dgregor@apple.com> Make sure to always check the result of
SourceManager::getPresumedLoc(), so that we don't try to make use of
an invalid presumed location. Doing so can cause crashes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
1397399de1cff90e0cb3b1d72097d34bd1a11759 10-Nov-2010 Chris Lattner <sabre@nondot.org> make sure #pragma clang is treated the same way as #pragma gcc in -E mode,
unknown pragmas should just be passed through to the .i file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118659 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
2346513da49f0a3e4f0deaf198e708d18390b41e 17-Sep-2010 Ted Kremenek <kremenek@apple.com> Handle '#line' in '-E' that has an empty file name. Fixes <rdar://problem/8439412>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
fe6834af25d0809215c9e205c9983dd6d3f968b4 11-Sep-2010 Douglas Gregor <dgregor@apple.com> Make sure we're producing a newline in the preprocessed output before
emitting a #pragma, whenever one is needed. Fixes <rdar://problem/8417307>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
80c60f72848896f867f6b7e664e7060d9e78f019 10-Sep-2010 Douglas Gregor <dgregor@apple.com> When we parse a pragma, keep track of how that pragma was originally
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information
to add appropriate newlines when translating _Pragma and __pragma into
#pragma, like GCC does. Fixes <rdar://problem/8412013>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
4566d1a0e5750dc21bd9120be3e1a98d60db5620 08-Sep-2010 Daniel Dunbar <daniel@zuster.org> Frontend/-H: Add comment on why I used a temporary string here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113379 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
f7c16d903f11814e2d6780e2a2e189b7a7afc4ed 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
2f05449fa1c9015a84b74c3308b856fc704662be 08-Aug-2010 Benjamin Kramer <benny.kra@googlemail.com> Push location through the MacroUndefined PPCallback and use it to print #undefs in -dD mode. (PR7818)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
9b36c3f0de0105e903130bbda3c4aea7d792c0af 13-Jul-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Modify the pragma handlers to accept and use StringRefs instead of IdentifierInfos.

When loading the PCH, IdentifierInfos that are associated with pragmas cause declarations that use these identifiers to be deserialized (e.g. the "clang" pragma causes the "clang" namespace to be loaded).
We can avoid this if we just use StringRefs for the pragmas.

As a bonus, since we don't have to create and pass IdentifierInfos, the pragma interfaces get a bit more simplified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
abfe094ce71c42656dcb84a3bdc3e79cb3c16fc3 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for #pragma message, patch by Michael Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
c54539cd173e20d8b179b9488fabfc5eb4cf5ee6 15-Jun-2010 Chris Lattner <sabre@nondot.org> fix the various buildbot failures by ensuring that tokens are really completely initialized.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106043 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
90db74c361f16de5f22c53358ed48797bc4888fc 15-Jun-2010 Chris Lattner <sabre@nondot.org> fix an uninitialized variable, patch by Michael Spencer!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
6133aeb97da5cab2d75c5f2c2f2561ea1b8fd0ff 12-Jun-2010 Chris Lattner <sabre@nondot.org> fix PR7360: -P mode turns off line markers, but not blank space.
Apparently some programs which abuse the preprocessor depend
on this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
c72cc5072cdc1a1a6e05f9d0f962f293a69248c4 11-Jun-2010 Daniel Dunbar <daniel@zuster.org> Preprocessor: Ignore unknown pragmas in -E -dM and -Eonly modes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105830 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
e127a0d80155b45dafe77f2b4380e5fa111a3345 20-Apr-2010 Chris Lattner <sabre@nondot.org> push some source location information down through the compiler,
into ContentCache::getBuffer. This allows it to produce
diagnostics on the broken #include line instead of without a
location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
8ed4ff6d05ef41027ddaa13000309e719fa27ce8 16-Apr-2010 Dan Gohman <gohman@apple.com> Remove this hard-coded buffer size. In some basic experiments preprocessing
large files, this doesn't seem significantly better than just letting
raw_ostream pick a buffer size.

This code predates raw-ostream's automatic buffer sizing; in fact, it
was introduced as part of the code which would eventually become
raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101473 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
86d0ef74303e9164a0860ce849af597d34f937ab 14-Apr-2010 Chris Lattner <sabre@nondot.org> Improve line marker directive locations, patch by Jordy Rose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101226 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
8877321ca66b2887c2f377a7f724a62f34fdf1cd 14-Apr-2010 Chris Lattner <sabre@nondot.org> make the token paste avoidance logic turn "..." into ".. ." instead of ". . ."
when avoiding paste. Patch by David Peixotto!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
df721408f54f87a790fb986dfd64984472a1f892 13-Apr-2010 Chris Lattner <sabre@nondot.org> cache the PP's SourceManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
88aae9188a64fe6385c7057af068aaeb8fc96b8e 13-Apr-2010 Chris Lattner <sabre@nondot.org> make the preprocessor listen to linemarker directives in -E mode,
PR6101. This is based on a patch and testcase by Jordy Rose!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
dbf8ee630e4c86e5150492eaf8dbceea3c718ee1 17-Mar-2010 Douglas Gregor <dgregor@apple.com> Entering the main source file in the preprocessor can fail if the
source file has been changed. Handle that failure more gracefully.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
193575455e00eca03fd7177f60e3f2e6263cb661 13-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Use SmallString instead of SmallVector

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
a5d10c4df435964600e104ebef6a96b106e416b7 07-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Rename to addPPCallbacks since we're effectively adding a callback and maybe chaining it to an existing one

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
e396007efa010568d7ac7dff15762aec7653fc63 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Revert 97324. Chris says this cleanup could hurt -E performance.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
8caa6c56b1c0047deb690f764265a35800572d50 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97324 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
ddeea5644367c9c153c9fee9e51bdea85ce43cbd 27-Feb-2010 Benjamin Kramer <benny.kra@googlemail.com> Add an overload of Preprocessor::getSpelling which takes a SmallVector and
returns a StringRef. Use it to simplify some repetitive code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
3ff2a4b861082f271bb769755ea6d1da4b3e6b8d 19-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Avoid an instantiation of std::sort.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
13d555859cd643d657000401ebc88ca404d23bba 09-Dec-2009 Chris Lattner <sabre@nondot.org> Neil points out that this could be simplified, do it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
807b93ee6ae2806b53131abc779d2b146d853aed 07-Dec-2009 Chris Lattner <sabre@nondot.org> fix -dM with variadic macros, PR5699


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
f7449346006d6b94b14a303eb82cad52c8e75413 07-Dec-2009 Chris Lattner <sabre@nondot.org> some code cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90732 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
d76fbda5da19c34752aa582e690a4dbd1cae39cd 06-Dec-2009 Steve Naroff <snaroff@apple.com> Integrate the following from the 'objective-rewrite' branch:

http://llvm.org/viewvc/llvm-project?view=rev&revision=71473



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90688 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
29cf746aef63b1984c013448e843a290b2badf7b 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOutputOptions to CompilerInvocation, and move initialization to
clang-cc/Options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86828 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
775bee71ad21c84bc130af22ac47c1c8e0f9e72f 11-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add PreprocessorOutputOptions, for things like -dM, -C, -CC which control -E
mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
3e27c01eb48c189723b263796d0dbe008b9c95c1 03-Nov-2009 Ted Kremenek <kremenek@apple.com> Fix buffer overflow in PrintMacroDefinition() by inverting the check to see if the target buffer needs to be resized. Fixes <rdar://problem/7255377>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85872 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
01eb9b9683535d8a65c704ad2c545903409e2d36 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5218: Replace IdentifierInfo::getName with StringRef version, now that clients
are updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
5ffe14ca96bd662de7820f6875d3f04789a640c1 18-Oct-2009 Daniel Dunbar <daniel@zuster.org> Move misc clients to IdentifierInfo StringRef API.
- strcmp -> ==
- OS.write(II->getName() ...) -> OS << II->getNameStr()
- Avoid std::string concatenation
- Use getNameStr().str() when an std::string is really needed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
ed2d7c4ffd4112ddf10cb95e48428bae0b36377a 15-Jun-2009 Chris Lattner <sabre@nondot.org> no really, add the lines :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
3ee211fd15dfeeb51bb69681084cdfcea427f314 15-Jun-2009 Chris Lattner <sabre@nondot.org> Fix PR2741 by making our newline tracking be aware of newlines that
can occur in the middle of comment tokens.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73365 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
3e753e279d2457cf16b45be88032c4a117f9adb3 02-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4288: Make -dD (dump macros with preprocessed source) play nicely with
# line directives.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72724 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
beaaccd8e2a8748f77b66e2b330fb9136937e14c 21-May-2009 Jay Foad <jay.foad@gmail.com> Use v.data() instead of &v[0] when SmallVector v might be empty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
ac8d6298a8ae9276412d8c054957dfa65a69eb14 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Clean up some unnecessary includes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72101 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/PrintPreprocessedOutput.cpp
b09f6e15c59b89d5820db8ef40598eb1d1323c1f 19-May-2009 Eli Friedman <eli.friedman@gmail.com> Move clang-cc.h to lib/Frontend/Utils.h, and move the associated .cpp
files to lib/Frontend.



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