~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/Target/TargetAsmLexer.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- llvm/Target/TargetAsmLexer.h - Target Assembly Lexer ----*- C++ -*-===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
 
 
10
#ifndef LLVM_TARGET_TARGETASMLEXER_H
 
11
#define LLVM_TARGET_TARGETASMLEXER_H
 
12
 
 
13
#include "llvm/MC/MCParser/MCAsmLexer.h"
 
14
 
 
15
namespace llvm {
 
16
class Target;
 
17
  
 
18
/// TargetAsmLexer - Generic interface to target specific assembly lexers.
 
19
class TargetAsmLexer {
 
20
  /// The current token
 
21
  AsmToken CurTok;
 
22
  
 
23
  /// The location and description of the current error
 
24
  SMLoc ErrLoc;
 
25
  std::string Err;
 
26
  
 
27
  TargetAsmLexer(const TargetAsmLexer &);   // DO NOT IMPLEMENT
 
28
  void operator=(const TargetAsmLexer &);  // DO NOT IMPLEMENT
 
29
protected: // Can only create subclasses.
 
30
  TargetAsmLexer(const Target &);
 
31
  
 
32
  virtual AsmToken LexToken() = 0;
 
33
  
 
34
  void SetError(const SMLoc &errLoc, const std::string &err) {
 
35
    ErrLoc = errLoc;
 
36
    Err = err;
 
37
  }
 
38
  
 
39
  /// TheTarget - The Target that this machine was created for.
 
40
  const Target &TheTarget;
 
41
  MCAsmLexer *Lexer;
 
42
  
 
43
public:
 
44
  virtual ~TargetAsmLexer();
 
45
  
 
46
  const Target &getTarget() const { return TheTarget; }
 
47
  
 
48
  /// InstallLexer - Set the lexer to get tokens from lower-level lexer \arg L.
 
49
  void InstallLexer(MCAsmLexer &L) {
 
50
    Lexer = &L;
 
51
  }
 
52
  
 
53
  MCAsmLexer *getLexer() {
 
54
    return Lexer;
 
55
  }
 
56
  
 
57
  /// Lex - Consume the next token from the input stream and return it.
 
58
  const AsmToken &Lex() {
 
59
    return CurTok = LexToken();
 
60
  }
 
61
  
 
62
  /// getTok - Get the current (last) lexed token.
 
63
  const AsmToken &getTok() {
 
64
    return CurTok;
 
65
  }
 
66
  
 
67
  /// getErrLoc - Get the current error location
 
68
  const SMLoc &getErrLoc() {
 
69
    return ErrLoc;
 
70
  }
 
71
  
 
72
  /// getErr - Get the current error string
 
73
  const std::string &getErr() {
 
74
    return Err;
 
75
  }
 
76
  
 
77
  /// getKind - Get the kind of current token.
 
78
  AsmToken::TokenKind getKind() const { return CurTok.getKind(); }
 
79
  
 
80
  /// is - Check if the current token has kind \arg K.
 
81
  bool is(AsmToken::TokenKind K) const { return CurTok.is(K); }
 
82
  
 
83
  /// isNot - Check if the current token has kind \arg K.
 
84
  bool isNot(AsmToken::TokenKind K) const { return CurTok.isNot(K); }
 
85
};
 
86
 
 
87
} // End llvm namespace
 
88
 
 
89
#endif