Skip to content
  • Chris Lattner's avatar
    Make a significant change to invert the control flow handling · 1f1b0dbc
    Chris Lattner authored
    predefined macros.  Previously, these were handled by the driver,
    now they are handled by the preprocessor.
    
    Some fallout of this:
    
    1. Instead of preprocessing two buffers (the predefines, then the 
       main source file)  we now start preprocessing the main source 
       file and inject the predefines as a "psuedo #include" from the
       main source file.
    2. #1 allows us to nuke the Lexer::IsMainFile flag and simplify
       Preprocessor::isInPrimaryFile.
    3. The driver doesn't have to know about standard #defines, the
       preprocessor knows, which is nice for people wanting to define
       their own drivers.
    4. This allows us to put normal tokens in the predefine buffer,
       for example a definition for __builtin_va_list that is 
       target-specific, and a typedef for id in objc.
    
    llvm-svn: 42818
    1f1b0dbc
Loading