diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-22 00:58:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-22 00:58:59 +0000 |
commit | af0d301f43ddc61582c5ceb3b9e0492d71dc4330 (patch) | |
tree | 6498052469955502a51e9c417101710261041fa0 | |
parent | 7979b72febb73f7bb1d1ed095a68f210822b2e7c (diff) | |
download | external_llvm-af0d301f43ddc61582c5ceb3b9e0492d71dc4330.zip external_llvm-af0d301f43ddc61582c5ceb3b9e0492d71dc4330.tar.gz external_llvm-af0d301f43ddc61582c5ceb3b9e0492d71dc4330.tar.bz2 |
stub out a new TargetAsmLexer interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94125 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetAsmLexer.h | 36 | ||||
-rw-r--r-- | lib/Target/TargetAsmLexer.cpp | 14 |
2 files changed, 50 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetAsmLexer.h b/include/llvm/Target/TargetAsmLexer.h new file mode 100644 index 0000000..998f5ba --- /dev/null +++ b/include/llvm/Target/TargetAsmLexer.h @@ -0,0 +1,36 @@ +//===-- llvm/Target/TargetAsmLexer.h - Target Assembly Lexer ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TARGET_TARGETASMLEXER_H +#define LLVM_TARGET_TARGETASMLEXER_H + +namespace llvm { +class Target; + +/// TargetAsmLexer - Generic interface to target specific assembly lexers. +class TargetAsmLexer { + TargetAsmLexer(const TargetAsmLexer &); // DO NOT IMPLEMENT + void operator=(const TargetAsmLexer &); // DO NOT IMPLEMENT +protected: // Can only create subclasses. + TargetAsmLexer(const Target &); + + /// TheTarget - The Target that this machine was created for. + const Target &TheTarget; + +public: + virtual ~TargetAsmLexer(); + + const Target &getTarget() const { return TheTarget; } + + +}; + +} // End llvm namespace + +#endif diff --git a/lib/Target/TargetAsmLexer.cpp b/lib/Target/TargetAsmLexer.cpp new file mode 100644 index 0000000..0ae6c14 --- /dev/null +++ b/lib/Target/TargetAsmLexer.cpp @@ -0,0 +1,14 @@ +//===-- llvm/Target/TargetAsmLexer.cpp - Target Assembly Lexer ------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "llvm/Target/TargetAsmLexer.h" +using namespace llvm; + +TargetAsmLexer::TargetAsmLexer(const Target &T) : TheTarget(T) {} +TargetAsmLexer::~TargetAsmLexer() {} |