~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to clang/include/clang/Lex/Preprocessor.h

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
  /// allocation.
398
398
  MacroInfoChain *MICache;
399
399
 
 
400
  struct DeserializedMacroInfoChain {
 
401
    MacroInfo MI;
 
402
    unsigned OwningModuleID; // MUST be immediately after the MacroInfo object
 
403
                     // so it can be accessed by MacroInfo::getOwningModuleID().
 
404
    DeserializedMacroInfoChain *Next;
 
405
  };
 
406
  DeserializedMacroInfoChain *DeserialMIChainHead;
 
407
 
400
408
public:
401
409
  Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts,
402
410
               DiagnosticsEngine &diags, LangOptions &opts,
449
457
  /// \brief Retrieve the module loader associated with this preprocessor.
450
458
  ModuleLoader &getModuleLoader() const { return TheModuleLoader; }
451
459
 
 
460
  bool hadModuleLoaderFatalFailure() const {
 
461
    return TheModuleLoader.HadFatalFailure;
 
462
  }
 
463
 
452
464
  /// \brief True if we are currently preprocessing a #if or #elif directive
453
465
  bool isParsingIfOrElifDirective() const { 
454
466
    return ParsingIfOrElifDirective;
820
832
      AnnotatePreviousCachedTokens(Tok);
821
833
  }
822
834
 
 
835
  /// Get the location of the last cached token, suitable for setting the end
 
836
  /// location of an annotation token.
 
837
  SourceLocation getLastCachedTokenLocation() const {
 
838
    assert(CachedLexPos != 0);
 
839
    return CachedTokens[CachedLexPos-1].getLocation();
 
840
  }
 
841
 
823
842
  /// \brief Replace the last token with an annotation token.
824
843
  ///
825
844
  /// Like AnnotateCachedTokens(), this routine replaces an
1392
1411
  bool InCachingLexMode() const {
1393
1412
    // If the Lexer pointers are 0 and IncludeMacroStack is empty, it means
1394
1413
    // that we are past EOF, not that we are in CachingLex mode.
1395
 
    return CurPPLexer == 0 && CurTokenLexer == 0 && CurPTHLexer == 0 &&
 
1414
    return !CurPPLexer && !CurTokenLexer && !CurPTHLexer &&
1396
1415
           !IncludeMacroStack.empty();
1397
1416
  }
1398
1417
  void EnterCachingLexMode();
1444
1463
  void HandlePragmaPoison(Token &PoisonTok);
1445
1464
  void HandlePragmaSystemHeader(Token &SysHeaderTok);
1446
1465
  void HandlePragmaDependency(Token &DependencyTok);
1447
 
  void HandlePragmaComment(Token &CommentTok);
1448
1466
  void HandlePragmaPushMacro(Token &Tok);
1449
1467
  void HandlePragmaPopMacro(Token &Tok);
1450
1468
  void HandlePragmaIncludeAlias(Token &Tok);