llvm-project/clang/Driver
Chris Lattner 14196c099f Implement -rewrite-macros, which is a crazy macro expander that expands
macros but doesn't expand #includes, remove comments, remove #defines
etc.

For example:

----
#include <stdio.h>

#define bbaa
#define funclike(x) x "a" x "b" x

bbaa  bbaa

#if 1 
funclike("gar")
foo /*blah*/  bar
bar
#endif

#if 0
funclike()
#endif
----


rewrites to:

----
#include <stdio.h>

#define bbaa
#define funclike(x) x "a" x "b" x 

/*bbaa  bbaa*/

#if 1
 "gar" "a" "gar" "b" "gar"/*funclike*//*("gar")*/
foo /*blah*/  bar
bar
#endif

#if 0
/*funclike()*/
#endif
----

llvm-svn: 50925
2008-05-10 00:02:33 +00:00
..
ASTConsumers.cpp This patch introduces declaration of getter methods for ObjC2's 2008-05-07 17:43:59 +00:00
ASTConsumers.h Provide the option to run the CF-retain checker in GC enabled mode. 2008-04-29 05:13:59 +00:00
DiagChecker.cpp rename ASTSTreamer.{h|cpp} -> ParseAST.{h|cpp} 2008-02-06 00:23:21 +00:00
HTMLDiagnostics.cpp Improve HTMLDiagnostics by understanding the "Below" hint. 2008-05-06 23:42:18 +00:00
HTMLDiagnostics.h class Preprocessor: Now owns the "predefines" char*; it deletes [] it in its dstor. 2008-04-17 22:31:54 +00:00
HTMLPrint.cpp simplify ownership of the predefines buffer. 2008-04-19 23:09:31 +00:00
Makefile Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo. 2008-05-08 08:54:20 +00:00
PrintParserCallbacks.cpp Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and remove 2008-01-14 16:44:48 +00:00
PrintPreprocessedOutput.cpp Fix rdar://5843510 don't assert and die when an invalid output 2008-04-11 06:14:11 +00:00
RewriteMacros.cpp Implement -rewrite-macros, which is a crazy macro expander that expands 2008-05-10 00:02:33 +00:00
RewriteObjC.cpp Fix <rdar://problem/5924225> clang ObjC rewriter: objc_exception_throw declaration in preamble does not match objc/objc-exception.h. 2008-05-09 21:17:56 +00:00
SerializationTest.cpp TranslationUnit now owns IdentifierTable, TargetInfo, and Selectors objects 2008-04-23 16:25:39 +00:00
TextDiagnosticBuffer.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
TextDiagnosticBuffer.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
TextDiagnosticPrinter.cpp Allow redirecting text diagnostic printer output to any llvm::OStream, rather 2008-04-17 18:06:57 +00:00
TextDiagnosticPrinter.h Allow redirecting text diagnostic printer output to any llvm::OStream, rather 2008-04-17 18:06:57 +00:00
TextDiagnostics.cpp Fix PR1966 by ignoring non-error diagnostics from system headers even if they are 2008-02-03 09:00:04 +00:00
TextDiagnostics.h Fix PR1966 by ignoring non-error diagnostics from system headers even if they are 2008-02-03 09:00:04 +00:00
clang.cpp make #if 0 code compile, even though it still isn't very useful. 2008-05-09 22:43:24 +00:00
clang.h make #if 0 code compile, even though it still isn't very useful. 2008-05-09 22:43:24 +00:00