mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Add Record Init
Add an init function to be shared among Record constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142501 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e22b321d22
commit
f7931b7040
@ -1394,6 +1394,7 @@ class Record {
|
||||
|
||||
DefInit *TheInit;
|
||||
|
||||
void init();
|
||||
void checkName();
|
||||
|
||||
public:
|
||||
|
@ -1684,6 +1684,10 @@ void RecordVal::print(raw_ostream &OS, bool PrintSem) const {
|
||||
|
||||
unsigned Record::LastID = 0;
|
||||
|
||||
void Record::init() {
|
||||
checkName();
|
||||
}
|
||||
|
||||
void Record::checkName() {
|
||||
// Ensure the record name has string type.
|
||||
const TypedInit *TypedName = dynamic_cast<const TypedInit *>(Name);
|
||||
|
Loading…
Reference in New Issue
Block a user