forked from OSchip/llvm-project
parent
b4f1b88551
commit
a80633ca14
|
|
@ -176,22 +176,6 @@ void LinkerScript::assignSymbol(SymbolAssignment *Cmd, bool InSec) {
|
|||
}
|
||||
}
|
||||
|
||||
bool SymbolAssignment::classof(const BaseCommand *C) {
|
||||
return C->Kind == AssignmentKind;
|
||||
}
|
||||
|
||||
bool InputSectionDescription::classof(const BaseCommand *C) {
|
||||
return C->Kind == InputSectionKind;
|
||||
}
|
||||
|
||||
bool AssertCommand::classof(const BaseCommand *C) {
|
||||
return C->Kind == AssertKind;
|
||||
}
|
||||
|
||||
bool BytesDataCommand::classof(const BaseCommand *C) {
|
||||
return C->Kind == BytesDataKind;
|
||||
}
|
||||
|
||||
static std::string filename(InputFile *File) {
|
||||
if (!File)
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -89,7 +89,9 @@ struct SymbolAssignment : BaseCommand {
|
|||
SymbolAssignment(StringRef Name, Expr E, std::string Loc)
|
||||
: BaseCommand(AssignmentKind), Name(Name), Expression(E), Location(Loc) {}
|
||||
|
||||
static bool classof(const BaseCommand *C);
|
||||
static bool classof(const BaseCommand *C) {
|
||||
return C->Kind == AssignmentKind;
|
||||
}
|
||||
|
||||
// The LHS of an expression. Name is either a symbol name or ".".
|
||||
StringRef Name;
|
||||
|
|
@ -140,7 +142,9 @@ struct InputSectionDescription : BaseCommand {
|
|||
InputSectionDescription(StringRef FilePattern)
|
||||
: BaseCommand(InputSectionKind), FilePat(FilePattern) {}
|
||||
|
||||
static bool classof(const BaseCommand *C);
|
||||
static bool classof(const BaseCommand *C) {
|
||||
return C->Kind == InputSectionKind;
|
||||
}
|
||||
|
||||
StringMatcher FilePat;
|
||||
|
||||
|
|
@ -155,7 +159,7 @@ struct InputSectionDescription : BaseCommand {
|
|||
struct AssertCommand : BaseCommand {
|
||||
AssertCommand(Expr E) : BaseCommand(AssertKind), Expression(E) {}
|
||||
|
||||
static bool classof(const BaseCommand *C);
|
||||
static bool classof(const BaseCommand *C) { return C->Kind == AssertKind; }
|
||||
|
||||
Expr Expression;
|
||||
};
|
||||
|
|
@ -165,7 +169,7 @@ struct BytesDataCommand : BaseCommand {
|
|||
BytesDataCommand(Expr E, unsigned Size)
|
||||
: BaseCommand(BytesDataKind), Expression(E), Size(Size) {}
|
||||
|
||||
static bool classof(const BaseCommand *C);
|
||||
static bool classof(const BaseCommand *C) { return C->Kind == BytesDataKind; }
|
||||
|
||||
Expr Expression;
|
||||
unsigned Offset;
|
||||
|
|
|
|||
Loading…
Reference in New Issue