summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-13 16:09:24 +0000
committerChris Lattner <sabre@nondot.org>2009-03-13 16:09:24 +0000
commit7b9ffe4a6db2e59c18510aac4ba30902653e13eb (patch)
treef626b383d32e32f761d3134f2f6a2c1cab7e58c1 /utils/TableGen/Record.h
parent1c8ae59dfdc85d917db0333ae0b93e2be4ca6c36 (diff)
downloadllvm-7b9ffe4a6db2e59c18510aac4ba30902653e13eb.tar.gz
llvm-7b9ffe4a6db2e59c18510aac4ba30902653e13eb.tar.bz2
llvm-7b9ffe4a6db2e59c18510aac4ba30902653e13eb.tar.xz
give each Record a location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r--utils/TableGen/Record.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index 87a49ee2f8..5eb07eb1e9 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -15,15 +15,13 @@
#ifndef RECORD_H
#define RECORD_H
+#include "TGSourceMgr.h"
#include "llvm/Support/DataTypes.h"
-#include <string>
-#include <vector>
#include <map>
#include <ostream>
-#include <cassert>
namespace llvm {
-
+
// RecTy subclasses.
class BitRecTy;
class BitsRecTy;
@@ -962,16 +960,20 @@ inline std::ostream &operator<<(std::ostream &OS, const RecordVal &RV) {
class Record {
std::string Name;
+ TGLoc Loc;
std::vector<std::string> TemplateArgs;
std::vector<RecordVal> Values;
std::vector<Record*> SuperClasses;
public:
- explicit Record(const std::string &N) : Name(N) {}
+ explicit Record(const std::string &N, TGLoc loc) : Name(N), Loc(loc) {}
~Record() {}
-
+
const std::string &getName() const { return Name; }
void setName(const std::string &Name); // Also updates RecordKeeper.
+
+ TGLoc getLoc() const { return Loc; }
+
const std::vector<std::string> &getTemplateArgs() const {
return TemplateArgs;
}
@@ -1198,6 +1200,9 @@ std::ostream &operator<<(std::ostream &OS, const RecordKeeper &RK);
extern RecordKeeper Records;
+void PrintError(TGLoc ErrorLoc, const std::string &Msg);
+
+
} // End llvm namespace
#endif