summaryrefslogtreecommitdiffstats
path: root/clang/test/Frontend/rewrite-includes-modules.c
Commit message (Collapse)AuthorAgeFilesLines
* Add pragma to perform module import and use it in -E output.Richard Smith2017-04-291-11/+16
| | | | | | | | | | | | | | | | | | | | | Many of our supported configurations support modules but do not have any first-class syntax to perform a module import. This leaves us with a problem: there is no way to represent the expansion of a #include that imports a module in the -E output for such languages. (We don't want to just leave it as a #include because that requires the consumer of the preprocessed source to have the same file system layout and include paths as the creator.) This patch adds a new pragma: #pragma clang module import MODULE.NAME.HERE that imports a module, and changes -E and -frewrite-includes to use it when rewriting a #include that maps to a module import. We don't make any attempt to use a native language syntax import if one exists, to get more consistent output. (If in the future, @import and #include have different semantics in some way, the pragma will track the #include semantics.) llvm-svn: 301725
* Commit some test changes somehow missed in r239789.Richard Smith2015-06-161-1/+1
| | | | llvm-svn: 239791
* Revert "clang/test/Driver/crash-report.c: This requires rewriter for ↵Alp Toker2014-07-161-0/+22
| | | | | | | | | | | | | | | | | | | | | -frewrite-includes. [PR20321]" We've decided to make the core rewriter class and PP rewriters mandatory. They're only a few hundred lines of code in total and not worth supporting as a distinct build configuration, especially since doing so disables key compiler features. This reverts commit r213150. Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter." This reverts commit r213148. Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/" This reverts commit r213146. llvm-svn: 213159
* Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/NAKAMURA Takumi2014-07-161-22/+0
| | | | llvm-svn: 213146
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+2
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207795
* revert r207756Lubos Lunak2014-05-011-2/+0
| | | | | | | | There's nothing wrong with the change itself, but test/Frontend/rewrite-includes-messages.c fails without another not-yet-committed fix. llvm-svn: 207762
* write a line marker right before adding included fileLubos Lunak2014-05-011-0/+2
| | | | | | | | Enclosing the original #include directive inside #if 0 adds lines, so warning/errors messages would have the line number off in "In file included from <file>:<line>:", so add line marker to fix this. llvm-svn: 207756
* [frontend] -frewrite-includes: turn implicit module imports into @imports.Argyrios Kyrtzidis2013-04-101-0/+20
rdar://13610250 llvm-svn: 179145
OpenPOWER on IntegriCloud