bool MachOAsmParser::ParseDirective(AsmToken DirectiveID) { StringRef IDVal = DirectiveID.getIdentifier(); SMLoc IDLoc = DirectiveID.getLoc(); // FIXME: This should be driven based on a hash lookup and callback. if (IDVal == ".section") return ParseDirectiveDarwinSection(); if (IDVal == ".zerofill") return ParseDirectiveDarwinZerofill(); if (IDVal == ".desc") return ParseDirectiveDarwinSymbolDesc(); if (IDVal == ".lsym") return ParseDirectiveDarwinLsym(); if (IDVal == ".tbss") return ParseDirectiveDarwinTBSS(); if (IDVal == ".comm") return ParseDirectiveComm(/*IsLocal=*/false); if (IDVal == ".lcomm") return ParseDirectiveComm(/*IsLocal=*/true); if (IDVal == ".subsections_via_symbols") return ParseDirectiveDarwinSubsectionsViaSymbols(); if (IDVal == ".dump") return ParseDirectiveDarwinDumpOrLoad(IDLoc, /*IsDump=*/true); if (IDVal == ".load") return ParseDirectiveDarwinDumpOrLoad(IDLoc, /*IsLoad=*/false); if (!ParseDirectiveSectionSwitch(IDVal)) return false; // Don't understand directive. return true; }
bool SystemZAsmParser::ParseDirective(AsmToken DirectiveID) { StringRef IDVal = DirectiveID.getIdentifier(); if (IDVal == ".insn") return ParseDirectiveInsn(DirectiveID.getLoc()); return true; }
/// ParseDirective parses the PPC specific directives bool PPCAsmParser::ParseDirective(AsmToken DirectiveID) { StringRef IDVal = DirectiveID.getIdentifier(); if (IDVal == ".word") return ParseDirectiveWord(4, DirectiveID.getLoc()); if (IDVal == ".tc") return ParseDirectiveTC(isPPC64()? 8 : 4, DirectiveID.getLoc()); return true; }
bool MSP430AsmParser::ParseDirective(AsmToken DirectiveID) { StringRef IDVal = DirectiveID.getIdentifier(); if (IDVal.lower() == ".long") { ParseLiteralValues(4, DirectiveID.getLoc()); } else if (IDVal.lower() == ".word" || IDVal.lower() == ".short") { ParseLiteralValues(2, DirectiveID.getLoc()); } else if (IDVal.lower() == ".byte") { ParseLiteralValues(1, DirectiveID.getLoc()); } else if (IDVal.lower() == ".refsym") { return ParseDirectiveRefSym(DirectiveID); } return true; }
bool ELFAsmParser::ParseDirective(AsmToken DirectiveID) { StringRef IDVal = DirectiveID.getIdentifier(); SMLoc IDLoc = DirectiveID.getLoc(); if (IDVal == ".local") return ParseDirectiveLocal(); if (IDVal == ".lcomm") return ParseDirectiveComm(/*IsLocal=*/true); if (IDVal == ".comm") return ParseDirectiveComm(/*IsLocal=*/false); if (IDVal == ".size") return ParseDirectiveSize(); if (!ParseDirectiveSectionSwitch(IDVal)) return false; // Don't understand directive. return true; }
/// ParseDirective parses the arm specific directives bool MBlazeAsmParser::ParseDirective(AsmToken DirectiveID) { StringRef IDVal = DirectiveID.getIdentifier(); if (IDVal == ".word") return ParseDirectiveWord(2, DirectiveID.getLoc()); return true; }