aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/llvm/include/llvm/TableGen
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-31 21:22:58 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-31 21:22:58 +0000
commit5ffd83dbcc34f10e07f6d3e968ae6365869615f4 (patch)
tree0e9f5cf729dde39f949698fddef45a34e2bc7f44 /contrib/llvm-project/llvm/include/llvm/TableGen
parent1799696096df87b52968b8996d00c91e0a5de8d9 (diff)
parentcfca06d7963fa0909f90483b42a6d7d194d01e08 (diff)
downloadsrc-5ffd83dbcc34f10e07f6d3e968ae6365869615f4.tar.gz
src-5ffd83dbcc34f10e07f6d3e968ae6365869615f4.zip
Notes
Diffstat (limited to 'contrib/llvm-project/llvm/include/llvm/TableGen')
-rw-r--r--contrib/llvm-project/llvm/include/llvm/TableGen/Main.h2
-rw-r--r--contrib/llvm-project/llvm/include/llvm/TableGen/Record.h22
-rw-r--r--contrib/llvm-project/llvm/include/llvm/TableGen/StringToOffsetTable.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/contrib/llvm-project/llvm/include/llvm/TableGen/Main.h b/contrib/llvm-project/llvm/include/llvm/TableGen/Main.h
index e464cd4d4fb5..4e05da36168f 100644
--- a/contrib/llvm-project/llvm/include/llvm/TableGen/Main.h
+++ b/contrib/llvm-project/llvm/include/llvm/TableGen/Main.h
@@ -22,7 +22,7 @@ class RecordKeeper;
/// Returns true on error, false otherwise.
using TableGenMainFn = bool (raw_ostream &OS, RecordKeeper &Records);
-int TableGenMain(char *argv0, TableGenMainFn *MainFn);
+int TableGenMain(const char *argv0, TableGenMainFn *MainFn);
} // end namespace llvm
diff --git a/contrib/llvm-project/llvm/include/llvm/TableGen/Record.h b/contrib/llvm-project/llvm/include/llvm/TableGen/Record.h
index a553ec99aaa4..a082fe5d74a1 100644
--- a/contrib/llvm-project/llvm/include/llvm/TableGen/Record.h
+++ b/contrib/llvm-project/llvm/include/llvm/TableGen/Record.h
@@ -614,7 +614,9 @@ public:
bool isConcrete() const override { return true; }
std::string getAsString() const override { return "\"" + Value.str() + "\""; }
- std::string getAsUnquotedString() const override { return Value; }
+ std::string getAsUnquotedString() const override {
+ return std::string(Value);
+ }
Init *getBit(unsigned Bit) const override {
llvm_unreachable("Illegal bit reference off string");
@@ -649,7 +651,9 @@ public:
return "[{" + Value.str() + "}]";
}
- std::string getAsUnquotedString() const override { return Value; }
+ std::string getAsUnquotedString() const override {
+ return std::string(Value);
+ }
Init *getBit(unsigned Bit) const override {
llvm_unreachable("Illegal bit reference off string");
@@ -1098,7 +1102,7 @@ public:
Init *getBit(unsigned Bit) const override;
- std::string getAsString() const override { return getName(); }
+ std::string getAsString() const override { return std::string(getName()); }
};
/// Opcode{0} - Represent access to one bit of a variable or field.
@@ -1291,6 +1295,7 @@ public:
Init *resolveReferences(Resolver &R) const override;
Init *Fold(Record *CurRec) const;
+ bool isConcrete() const override;
std::string getAsString() const override {
return Rec->getAsString() + "." + FieldName->getValue().str();
}
@@ -1599,11 +1604,6 @@ public:
/// recursion / infinite loops.
void resolveReferences(Resolver &R, const RecordVal *SkipVal = nullptr);
- /// If anything in this record refers to RV, replace the
- /// reference to RV with the RHS of RV. If RV is null, we resolve all
- /// possible references.
- void resolveReferencesTo(const RecordVal *RV);
-
RecordKeeper &getRecords() const {
return TrackedRecords;
}
@@ -1722,21 +1722,21 @@ public:
}
void addClass(std::unique_ptr<Record> R) {
- bool Ins = Classes.insert(std::make_pair(R->getName(),
+ bool Ins = Classes.insert(std::make_pair(std::string(R->getName()),
std::move(R))).second;
(void)Ins;
assert(Ins && "Class already exists");
}
void addDef(std::unique_ptr<Record> R) {
- bool Ins = Defs.insert(std::make_pair(R->getName(),
+ bool Ins = Defs.insert(std::make_pair(std::string(R->getName()),
std::move(R))).second;
(void)Ins;
assert(Ins && "Record already exists");
}
void addExtraGlobal(StringRef Name, Init *I) {
- bool Ins = ExtraGlobals.insert(std::make_pair(Name, I)).second;
+ bool Ins = ExtraGlobals.insert(std::make_pair(std::string(Name), I)).second;
(void)Ins;
assert(!getDef(Name));
assert(Ins && "Global already exists");
diff --git a/contrib/llvm-project/llvm/include/llvm/TableGen/StringToOffsetTable.h b/contrib/llvm-project/llvm/include/llvm/TableGen/StringToOffsetTable.h
index 76ce51893907..7fcf20abed61 100644
--- a/contrib/llvm-project/llvm/include/llvm/TableGen/StringToOffsetTable.h
+++ b/contrib/llvm-project/llvm/include/llvm/TableGen/StringToOffsetTable.h
@@ -45,7 +45,7 @@ public:
// Escape the string.
SmallString<256> Str;
raw_svector_ostream(Str).write_escaped(AggregateString);
- AggregateString = Str.str();
+ AggregateString = std::string(Str.str());
O << " \"";
unsigned CharsPrinted = 0;