initial
This commit is contained in:
40
thirdparty/clang/include/llvm/TableGen/Error.h
vendored
Normal file
40
thirdparty/clang/include/llvm/TableGen/Error.h
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
//===- llvm/TableGen/Error.h - tblgen error handling helpers ----*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file contains error handling helper routines to pretty-print diagnostic
|
||||
// messages from tblgen.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TABLEGEN_ERROR_H
|
||||
#define LLVM_TABLEGEN_ERROR_H
|
||||
|
||||
#include "llvm/Support/SourceMgr.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
void PrintWarning(ArrayRef<SMLoc> WarningLoc, const Twine &Msg);
|
||||
void PrintWarning(const char *Loc, const Twine &Msg);
|
||||
void PrintWarning(const Twine &Msg);
|
||||
|
||||
void PrintError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg);
|
||||
void PrintError(const char *Loc, const Twine &Msg);
|
||||
void PrintError(const Twine &Msg);
|
||||
|
||||
LLVM_ATTRIBUTE_NORETURN void PrintFatalError(const std::string &Msg);
|
||||
LLVM_ATTRIBUTE_NORETURN void PrintFatalError(ArrayRef<SMLoc> ErrorLoc,
|
||||
const std::string &Msg);
|
||||
|
||||
extern SourceMgr SrcMgr;
|
||||
extern unsigned ErrorsPrinted;
|
||||
|
||||
|
||||
} // end namespace "llvm"
|
||||
|
||||
#endif
|
||||
29
thirdparty/clang/include/llvm/TableGen/Main.h
vendored
Normal file
29
thirdparty/clang/include/llvm/TableGen/Main.h
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
//===- llvm/TableGen/Main.h - tblgen entry point ----------------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file declares the common entry point for tblgen tools.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TABLEGEN_MAIN_H
|
||||
#define LLVM_TABLEGEN_MAIN_H
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class RecordKeeper;
|
||||
class raw_ostream;
|
||||
/// \brief Perform the action using Records, and write output to OS.
|
||||
/// \returns true on error, false otherwise
|
||||
typedef bool TableGenMainFn(raw_ostream &OS, RecordKeeper &Records);
|
||||
|
||||
int TableGenMain(char *argv0, TableGenMainFn *MainFn);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
1748
thirdparty/clang/include/llvm/TableGen/Record.h
vendored
Normal file
1748
thirdparty/clang/include/llvm/TableGen/Record.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
54
thirdparty/clang/include/llvm/TableGen/StringMatcher.h
vendored
Normal file
54
thirdparty/clang/include/llvm/TableGen/StringMatcher.h
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
//===- StringMatcher.h - Generate a matcher for input strings ---*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements the StringMatcher class.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TABLEGEN_STRINGMATCHER_H
|
||||
#define LLVM_TABLEGEN_STRINGMATCHER_H
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace llvm {
|
||||
class raw_ostream;
|
||||
|
||||
/// StringMatcher - Given a list of strings and code to execute when they match,
|
||||
/// output a simple switch tree to classify the input string.
|
||||
///
|
||||
/// If a match is found, the code in Vals[i].second is executed; control must
|
||||
/// not exit this code fragment. If nothing matches, execution falls through.
|
||||
///
|
||||
class StringMatcher {
|
||||
public:
|
||||
typedef std::pair<std::string, std::string> StringPair;
|
||||
private:
|
||||
StringRef StrVariableName;
|
||||
const std::vector<StringPair> &Matches;
|
||||
raw_ostream &OS;
|
||||
|
||||
public:
|
||||
StringMatcher(StringRef strVariableName,
|
||||
const std::vector<StringPair> &matches, raw_ostream &os)
|
||||
: StrVariableName(strVariableName), Matches(matches), OS(os) {}
|
||||
|
||||
void Emit(unsigned Indent = 0) const;
|
||||
|
||||
|
||||
private:
|
||||
bool EmitStringMatcherForChar(const std::vector<const StringPair*> &Matches,
|
||||
unsigned CharNo, unsigned IndentCount) const;
|
||||
};
|
||||
|
||||
} // end llvm namespace.
|
||||
|
||||
#endif
|
||||
29
thirdparty/clang/include/llvm/TableGen/TableGenBackend.h
vendored
Normal file
29
thirdparty/clang/include/llvm/TableGen/TableGenBackend.h
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
//===- llvm/TableGen/TableGenBackend.h - Backend utilities ------*- C++ -*-===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Useful utilities for TableGen backends.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_TABLEGEN_TABLEGENBACKEND_H
|
||||
#define LLVM_TABLEGEN_TABLEGENBACKEND_H
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
class raw_ostream;
|
||||
|
||||
/// emitSourceFileHeader - Output a LLVM style file header to the specified
|
||||
/// raw_ostream.
|
||||
void emitSourceFileHeader(StringRef Desc, raw_ostream &OS);
|
||||
|
||||
} // End llvm namespace
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user