You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
744
external/llvm/lib/MC/MCParser/AsmLexer.cpp
vendored
744
external/llvm/lib/MC/MCParser/AsmLexer.cpp
vendored
File diff suppressed because it is too large
Load Diff
@ -1 +0,0 @@
|
||||
ce3b70bed740dbf90bfc367e954e56899951d538
|
14
external/llvm/lib/MC/MCParser/CMakeLists.txt
vendored
14
external/llvm/lib/MC/MCParser/CMakeLists.txt
vendored
@ -1,14 +0,0 @@
|
||||
add_llvm_library(LLVMMCParser
|
||||
AsmLexer.cpp
|
||||
AsmParser.cpp
|
||||
COFFAsmParser.cpp
|
||||
DarwinAsmParser.cpp
|
||||
ELFAsmParser.cpp
|
||||
MCAsmLexer.cpp
|
||||
MCAsmParser.cpp
|
||||
MCAsmParserExtension.cpp
|
||||
MCTargetAsmParser.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${LLVM_MAIN_INCLUDE_DIR}/llvm/MC/MCParser
|
||||
)
|
816
external/llvm/lib/MC/MCParser/COFFAsmParser.cpp
vendored
816
external/llvm/lib/MC/MCParser/COFFAsmParser.cpp
vendored
File diff suppressed because it is too large
Load Diff
1145
external/llvm/lib/MC/MCParser/DarwinAsmParser.cpp
vendored
1145
external/llvm/lib/MC/MCParser/DarwinAsmParser.cpp
vendored
File diff suppressed because it is too large
Load Diff
851
external/llvm/lib/MC/MCParser/ELFAsmParser.cpp
vendored
851
external/llvm/lib/MC/MCParser/ELFAsmParser.cpp
vendored
File diff suppressed because it is too large
Load Diff
22
external/llvm/lib/MC/MCParser/LLVMBuild.txt
vendored
22
external/llvm/lib/MC/MCParser/LLVMBuild.txt
vendored
@ -1,22 +0,0 @@
|
||||
;===- ./lib/MC/MCParser/LLVMBuild.txt --------------------------*- Conf -*--===;
|
||||
;
|
||||
; The LLVM Compiler Infrastructure
|
||||
;
|
||||
; This file is distributed under the University of Illinois Open Source
|
||||
; License. See LICENSE.TXT for details.
|
||||
;
|
||||
;===------------------------------------------------------------------------===;
|
||||
;
|
||||
; This is an LLVMBuild description file for the components in this subdirectory.
|
||||
;
|
||||
; For more information on the LLVMBuild system, please see:
|
||||
;
|
||||
; http://llvm.org/docs/LLVMBuild.html
|
||||
;
|
||||
;===------------------------------------------------------------------------===;
|
||||
|
||||
[component_0]
|
||||
type = Library
|
||||
name = MCParser
|
||||
parent = MC
|
||||
required_libraries = MC Support
|
36
external/llvm/lib/MC/MCParser/MCAsmLexer.cpp
vendored
36
external/llvm/lib/MC/MCParser/MCAsmLexer.cpp
vendored
@ -1,36 +0,0 @@
|
||||
//===- MCAsmLexer.cpp - Abstract Asm Lexer Interface ----------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/SMLoc.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
MCAsmLexer::MCAsmLexer() : AltMacroMode(false) {
|
||||
CurTok.emplace_back(AsmToken::Space, StringRef());
|
||||
}
|
||||
|
||||
MCAsmLexer::~MCAsmLexer() = default;
|
||||
|
||||
SMLoc MCAsmLexer::getLoc() const {
|
||||
return SMLoc::getFromPointer(TokStart);
|
||||
}
|
||||
|
||||
SMLoc AsmToken::getLoc() const {
|
||||
return SMLoc::getFromPointer(Str.data());
|
||||
}
|
||||
|
||||
SMLoc AsmToken::getEndLoc() const {
|
||||
return SMLoc::getFromPointer(Str.data() + Str.size());
|
||||
}
|
||||
|
||||
SMRange AsmToken::getLocRange() const {
|
||||
return SMRange(getLoc(), getEndLoc());
|
||||
}
|
137
external/llvm/lib/MC/MCParser/MCAsmParser.cpp
vendored
137
external/llvm/lib/MC/MCParser/MCAsmParser.cpp
vendored
@ -1,137 +0,0 @@
|
||||
//===-- MCAsmParser.cpp - Abstract Asm Parser Interface -------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/MC/MCParser/MCAsmParser.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/MC/MCParser/MCAsmLexer.h"
|
||||
#include "llvm/MC/MCParser/MCParsedAsmOperand.h"
|
||||
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/SMLoc.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cassert>
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
MCAsmParser::MCAsmParser() : ShowParsedOperands(0) {}
|
||||
|
||||
MCAsmParser::~MCAsmParser() = default;
|
||||
|
||||
void MCAsmParser::setTargetParser(MCTargetAsmParser &P) {
|
||||
assert(!TargetParser && "Target parser is already initialized!");
|
||||
TargetParser = &P;
|
||||
TargetParser->Initialize(*this);
|
||||
}
|
||||
|
||||
const AsmToken &MCAsmParser::getTok() const {
|
||||
return getLexer().getTok();
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseTokenLoc(SMLoc &Loc) {
|
||||
Loc = getTok().getLoc();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseEOL(const Twine &Msg) {
|
||||
if (getTok().getKind() != AsmToken::EndOfStatement)
|
||||
return Error(getTok().getLoc(), Msg);
|
||||
Lex();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseToken(AsmToken::TokenKind T, const Twine &Msg) {
|
||||
if (T == AsmToken::EndOfStatement)
|
||||
return parseEOL(Msg);
|
||||
if (getTok().getKind() != T)
|
||||
return Error(getTok().getLoc(), Msg);
|
||||
Lex();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseIntToken(int64_t &V, const Twine &Msg) {
|
||||
if (getTok().getKind() != AsmToken::Integer)
|
||||
return TokError(Msg);
|
||||
V = getTok().getIntVal();
|
||||
Lex();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseOptionalToken(AsmToken::TokenKind T) {
|
||||
bool Present = (getTok().getKind() == T);
|
||||
if (Present)
|
||||
parseToken(T);
|
||||
return Present;
|
||||
}
|
||||
|
||||
bool MCAsmParser::check(bool P, const Twine &Msg) {
|
||||
return check(P, getTok().getLoc(), Msg);
|
||||
}
|
||||
|
||||
bool MCAsmParser::check(bool P, SMLoc Loc, const Twine &Msg) {
|
||||
if (P)
|
||||
return Error(Loc, Msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCAsmParser::TokError(const Twine &Msg, SMRange Range) {
|
||||
return Error(getLexer().getLoc(), Msg, Range);
|
||||
}
|
||||
|
||||
bool MCAsmParser::Error(SMLoc L, const Twine &Msg, SMRange Range) {
|
||||
HadError = true;
|
||||
|
||||
MCPendingError PErr;
|
||||
PErr.Loc = L;
|
||||
Msg.toVector(PErr.Msg);
|
||||
PErr.Range = Range;
|
||||
PendingErrors.push_back(PErr);
|
||||
|
||||
// If we threw this parsing error after a lexing error, this should
|
||||
// supercede the lexing error and so we remove it from the Lexer
|
||||
// before it can propagate
|
||||
if (getTok().is(AsmToken::Error))
|
||||
getLexer().Lex();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MCAsmParser::addErrorSuffix(const Twine &Suffix) {
|
||||
// Make sure lexing errors have propagated to the parser.
|
||||
if (getTok().is(AsmToken::Error))
|
||||
Lex();
|
||||
for (auto &PErr : PendingErrors)
|
||||
Suffix.toVector(PErr.Msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseMany(function_ref<bool()> parseOne, bool hasComma) {
|
||||
if (parseOptionalToken(AsmToken::EndOfStatement))
|
||||
return false;
|
||||
while (true) {
|
||||
if (parseOne())
|
||||
return true;
|
||||
if (parseOptionalToken(AsmToken::EndOfStatement))
|
||||
return false;
|
||||
if (hasComma && parseToken(AsmToken::Comma))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool MCAsmParser::parseExpression(const MCExpr *&Res) {
|
||||
SMLoc L;
|
||||
return parseExpression(Res, L);
|
||||
}
|
||||
|
||||
void MCParsedAsmOperand::dump() const {
|
||||
// Cannot completely remove virtual function even in release mode.
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
dbgs() << " " << *this;
|
||||
#endif
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
//===- MCAsmParserExtension.cpp - Asm Parser Hooks ------------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/MC/MCParser/MCAsmParserExtension.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
MCAsmParserExtension::MCAsmParserExtension() = default;
|
||||
|
||||
MCAsmParserExtension::~MCAsmParserExtension() = default;
|
||||
|
||||
void MCAsmParserExtension::Initialize(MCAsmParser &Parser) {
|
||||
this->Parser = &Parser;
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
//===-- MCTargetAsmParser.cpp - Target Assembly Parser --------------------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/MC/MCParser/MCTargetAsmParser.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
MCTargetAsmParser::MCTargetAsmParser(MCTargetOptions const &MCOptions,
|
||||
const MCSubtargetInfo &STI,
|
||||
const MCInstrInfo &MII)
|
||||
: MCOptions(MCOptions), STI(&STI), MII(MII) {}
|
||||
|
||||
MCTargetAsmParser::~MCTargetAsmParser() = default;
|
||||
|
||||
MCSubtargetInfo &MCTargetAsmParser::copySTI() {
|
||||
MCSubtargetInfo &STICopy = getContext().getSubtargetCopy(getSTI());
|
||||
STI = &STICopy;
|
||||
return STICopy;
|
||||
}
|
||||
|
||||
const MCSubtargetInfo &MCTargetAsmParser::getSTI() const {
|
||||
return *STI;
|
||||
}
|
Reference in New Issue
Block a user