Go to the documentation of this file.
63 cl::desc(
"As secure log file name (initialized from "
64 "AS_SECURE_LOG_FILE env variable)"),
68 std::vector<const MDNode *> &) {
75 bool DoAutoReset,
StringRef Swift5ReflSegmentName)
76 : Swift5ReflectionSegmentName(Swift5ReflSegmentName), TT(TheTriple),
95 "Cannot initialize MC for non-Windows COFF object files.");
142 InlineSrcMgr.reset();
147 COFFAllocator.DestroyAll();
148 ELFAllocator.DestroyAll();
149 GOFFAllocator.DestroyAll();
150 MachOAllocator.DestroyAll();
151 WasmAllocator.DestroyAll();
152 XCOFFAllocator.DestroyAll();
153 MCInstAllocator.DestroyAll();
154 SPIRVAllocator.DestroyAll();
156 MCSubtargetAllocator.DestroyAll();
157 InlineAsmUsedLabelNames.
clear();
162 CompilationDir.
clear();
163 MainFileName.clear();
164 MCDwarfLineTablesCUMap.clear();
165 SectionsForRanges.clear();
166 MCGenDwarfLabelEntries.clear();
168 DwarfCompileUnitID = 0;
173 MachOUniquingMap.clear();
174 ELFUniquingMap.clear();
175 GOFFUniquingMap.clear();
176 COFFUniquingMap.clear();
177 WasmUniquingMap.clear();
178 XCOFFUniquingMap.clear();
180 ELFEntrySizeMap.clear();
181 ELFSeenGenericMergeableSections.clear();
184 AllowTemporaryLabels =
true;
185 DwarfLocSeen =
false;
186 GenDwarfForAssembly =
false;
187 GenDwarfFileNumber = 0;
197 return new (MCInstAllocator.Allocate())
MCInst;
208 assert(!NameRef.
empty() &&
"Normal symbols cannot be unnamed!");
212 Sym = createSymbol(NameRef,
false,
false);
220 "$frame_escape_" +
Twine(Idx));
225 "$parent_frame_offset");
235 static_assert(std::is_trivially_destructible<MCSymbolCOFF>(),
236 "MCSymbol classes must be trivially destructible");
237 static_assert(std::is_trivially_destructible<MCSymbolELF>(),
238 "MCSymbol classes must be trivially destructible");
239 static_assert(std::is_trivially_destructible<MCSymbolMachO>(),
240 "MCSymbol classes must be trivially destructible");
241 static_assert(std::is_trivially_destructible<MCSymbolWasm>(),
242 "MCSymbol classes must be trivially destructible");
243 static_assert(std::is_trivially_destructible<MCSymbolXCOFF>(),
244 "MCSymbol classes must be trivially destructible");
258 return createXCOFFSymbolImpl(
Name, IsTemporary);
262 return new (
Name, *
this)
271 if (CanBeUnnamed && !UseNamesOnTempLabels)
272 return createSymbolImpl(
nullptr,
true);
276 bool IsTemporary = CanBeUnnamed;
277 if (AllowTemporaryLabels && !IsTemporary)
281 bool AddSuffix = AlwaysAddSuffix;
282 unsigned &NextUniqueID = NextID[
Name];
288 auto NameEntry = UsedNames.insert(std::make_pair(NewName.
str(),
true));
289 if (NameEntry.second || !NameEntry.first->second) {
292 NameEntry.first->second =
true;
295 return createSymbolImpl(&*NameEntry.first, IsTemporary);
297 assert(IsTemporary &&
"Cannot rename non-temporary symbols");
306 return createSymbol(NameSV, AlwaysAddSuffix,
true);
312 return createSymbol(NameSV,
true,
false);
318 return createSymbol(NameSV,
true,
false);
327 unsigned MCContext::NextInstance(
unsigned LocalLabelVal) {
328 MCLabel *&Label = Instances[LocalLabelVal];
330 Label =
new (*this)
MCLabel(0);
331 return Label->incInstance();
334 unsigned MCContext::GetInstance(
unsigned LocalLabelVal) {
335 MCLabel *&Label = Instances[LocalLabelVal];
337 Label =
new (*this)
MCLabel(0);
338 return Label->getInstance();
341 MCSymbol *MCContext::getOrCreateDirectionalLocalSymbol(
unsigned LocalLabelVal,
343 MCSymbol *&Sym = LocalSymbols[std::make_pair(LocalLabelVal, Instance)];
350 unsigned Instance = NextInstance(LocalLabelVal);
351 return getOrCreateDirectionalLocalSymbol(LocalLabelVal, Instance);
356 unsigned Instance = GetInstance(LocalLabelVal);
359 return getOrCreateDirectionalLocalSymbol(LocalLabelVal, Instance);
365 return Symbols.
lookup(NameRef);
376 InlineAsmUsedLabelNames[Sym->
getName()] = Sym;
383 return new (
nullptr, *
this)
MCSymbolXCOFF(
nullptr, IsTemporary);
401 const bool IsEntryPoint = !InvalidName.empty() && InvalidName[0] ==
'.';
403 StringRef(IsEntryPoint ?
"._Renamed.." :
"_Renamed..");
407 for (
size_t I = 0;
I < InvalidName.size(); ++
I) {
410 InvalidName[
I] =
'_';
417 ValidName.
append(InvalidName.substr(1, InvalidName.size() - 1));
419 ValidName.
append(InvalidName);
421 auto NameEntry = UsedNames.insert(std::make_pair(ValidName.
str(),
true));
422 assert((NameEntry.second || !NameEntry.first->second) &&
423 "This name is used somewhere else.");
425 NameEntry.first->second =
true;
439 unsigned TypeAndAttributes,
441 const char *BeginSymName) {
447 assert(Section.size() <= 16 &&
"section name is too long");
448 assert(!memchr(Section.data(),
'\0', Section.size()) &&
449 "section name cannot contain NUL");
452 auto R = MachOUniquingMap.try_emplace((Segment +
Twine(
',') + Section).str());
454 return R.first->second;
462 R.first->second =
new (MachOAllocator.Allocate())
464 TypeAndAttributes, Reserved2,
Kind, Begin);
465 return R.first->second;
470 if (
const MCSymbol *Group = Section->getGroup())
471 GroupName = Group->getName();
475 unsigned UniqueID = Section->getUniqueID();
476 ELFUniquingMap.erase(
477 ELFSectionKey{Section->getName(), GroupName,
"", UniqueID});
478 auto I = ELFUniquingMap
479 .insert(std::make_pair(
480 ELFSectionKey{
Name, GroupName,
"", UniqueID}, Section))
483 const_cast<MCSectionELF *
>(Section)->setSectionName(CachedName);
490 bool Comdat,
unsigned UniqueID,
500 R = cast<MCSymbolELF>(Sym);
502 auto NameIter = UsedNames.insert(std::make_pair(Section,
false)).first;
503 R =
new (&*NameIter, *
this)
MCSymbolELF(&*NameIter,
false);
510 auto *
Ret =
new (ELFAllocator.Allocate())
515 Ret->getFragmentList().insert(
Ret->begin(),
F);
523 unsigned Flags,
unsigned EntrySize,
528 std::tie(
I, Inserted) =
529 RelSecNames.
insert(std::make_pair(
Name.str(),
true));
531 return createELFSectionImpl(
539 unsigned EntrySize) {
545 unsigned Flags,
unsigned EntrySize,
546 const Twine &Group,
bool IsComdat,
554 UniqueID, LinkedToSym);
558 unsigned Flags,
unsigned EntrySize,
560 bool IsComdat,
unsigned UniqueID,
567 auto IterBool = ELFUniquingMap.insert(std::make_pair(
568 ELFSectionKey{Section.str(), Group,
569 LinkedToSym ? LinkedToSym->
getName() :
"", UniqueID},
571 auto &Entry = *IterBool.first;
572 if (!IterBool.second)
575 StringRef CachedName = Entry.first.SectionName;
586 createELFSectionImpl(CachedName,
Type, Flags,
Kind, EntrySize, GroupSym,
587 IsComdat, UniqueID, LinkedToSym);
588 Entry.second = Result;
591 Result->getUniqueID(), Result->getEntrySize());
604 unsigned Flags,
unsigned UniqueID,
605 unsigned EntrySize) {
608 ELFSeenGenericMergeableSections.insert(
SectionName);
614 ELFEntrySizeMap.insert(std::make_pair(
615 ELFEntrySizeKey{
SectionName, Flags, EntrySize}, UniqueID));
626 ELFSeenGenericMergeableSections.count(
SectionName);
631 unsigned EntrySize) {
632 auto I = ELFEntrySizeMap.find(
633 MCContext::ELFEntrySizeKey{
SectionName, Flags, EntrySize});
639 const MCExpr *SubsectionId) {
641 auto &GOFFSection = GOFFUniquingMap[Section.str()];
643 GOFFSection =
new (GOFFAllocator.Allocate())
654 const char *BeginSymName) {
656 if (!COMDATSymName.
empty()) {
658 COMDATSymName = COMDATSymbol->
getName();
663 COFFSectionKey
T{Section, COMDATSymName,
Selection, UniqueID};
664 auto IterBool = COFFUniquingMap.insert(std::make_pair(
T,
nullptr));
665 auto Iter = IterBool.first;
666 if (!IterBool.second)
673 StringRef CachedName = Iter->first.SectionName;
677 Iter->second = Result;
684 const char *BeginSymName) {
711 unsigned Flags,
const Twine &Group,
713 const char *BeginSymName) {
720 return getWasmSection(Section, K, Flags, GroupSym, UniqueID, BeginSymName);
727 const char *BeginSymName) {
732 auto IterBool = WasmUniquingMap.insert(
733 std::make_pair(WasmSectionKey{Section.str(), Group, UniqueID},
nullptr));
734 auto &Entry = *IterBool.first;
735 if (!IterBool.second)
738 StringRef CachedName = Entry.first.SectionName;
740 MCSymbol *Begin = createSymbol(CachedName,
true,
false);
741 Symbols[Begin->
getName()] = Begin;
746 Entry.second = Result;
749 Result->getFragmentList().insert(Result->begin(),
F);
750 F->setParent(Result);
758 return XCOFFUniquingMap.count(
759 XCOFFSectionKey(Section.str(), CsectProp.
MappingClass)) != 0;
765 const char *BeginSymName,
768 assert((IsDwarfSec != CsectProp.
hasValue()) &&
"Invalid XCOFF section!");
771 auto IterBool = XCOFFUniquingMap.insert(std::make_pair(
774 : XCOFFSectionKey(Section.str(), CsectProp->
MappingClass),
776 auto &Entry = *IterBool.first;
777 if (!IterBool.second) {
786 StringRef CachedName = Entry.first.SectionName;
804 Result =
new (XCOFFAllocator.Allocate())
807 MultiSymbolsAllowed);
809 Result =
new (XCOFFAllocator.Allocate())
811 CsectProp->
Type,
Kind, QualName, Begin, CachedName,
812 MultiSymbolsAllowed);
814 Entry.second = Result;
817 Result->getFragmentList().insert(Result->begin(),
F);
818 F->setParent(Result);
821 Begin->setFragment(
F);
832 Result->getFragmentList().insert(Result->begin(),
F);
833 F->setParent(Result);
846 const std::string &To) {
847 DebugPrefixMap.insert(std::make_pair(
From, To));
851 const auto &DebugPrefixMap = this->DebugPrefixMap;
852 if (DebugPrefixMap.empty())
855 const auto RemapDebugPath = [&DebugPrefixMap](std::string &Path) {
857 for (
const auto &Entry : DebugPrefixMap) {
859 Path =
P.str().str();
866 std::string CompDir = std::string(CompilationDir.
str());
867 RemapDebugPath(CompDir);
868 CompilationDir = CompDir;
871 for (
auto &CUIDTablePair : MCDwarfLineTablesCUMap)
872 for (
auto &Dir : CUIDTablePair.second.getMCDwarfDirs())
901 if (FileNameBuf.empty() || FileNameBuf ==
"-")
902 FileNameBuf =
"<stdin>";
927 return Table.
tryGetFile(Directory, FileName, Checksum,
Source, DwarfVersion,
946 SectionsForRanges.remove_if(
961 assert(DiagHandler &&
"MCContext::DiagHandler is not set");
962 bool UseInlineSrcMgr =
false;
966 }
else if (InlineSrcMgr) {
967 SMP = InlineSrcMgr.get();
968 UseInlineSrcMgr =
true;
971 DiagHandler(SMD, UseInlineSrcMgr, *SMP, LocInfos);
974 void MCContext::reportCommon(
984 bool UseInlineSrcMgr =
false;
993 }
else if (InlineSrcMgr) {
994 SMP = InlineSrcMgr.get();
995 UseInlineSrcMgr =
true;
1002 DiagHandler(
D, UseInlineSrcMgr, *SMP, LocInfos);
Expected< unsigned > tryGetFile(StringRef &Directory, StringRef &FileName, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, uint16_t DwarfVersion, unsigned FileNumber=0)
@ WASM_SYMBOL_TYPE_SECTION
virtual bool isAcceptableChar(char C) const
Return true if C is an acceptable character inside a symbol name.
LLVM_NODISCARD bool startswith(StringRef Prefix) const
Check if this string starts with the given Prefix.
StringRef getLinkerPrivateGlobalPrefix() const
@ GenericSectionID
Pass this value as the UniqueID during section creation to get the generic section with the given nam...
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool replace_path_prefix(SmallVectorImpl< char > &Path, StringRef OldPrefix, StringRef NewPrefix, Style style=Style::native)
Replace matching path prefix with another path.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
static SectionKind getExecuteOnly()
void update(ArrayRef< uint8_t > Data)
Updates the hash for the byte stream provided.
void Reset()
Deallocate all but the current slab and reset the current pointer to the beginning of it,...
CodeViewContext & getCVContext()
MCSymbol * getOrCreateParentFrameOffsetSymbol(StringRef FuncName)
DwarfSectionSubtypeFlags
Values for defining the section subtype of sections of type STYP_DWARF as they would appear in the (s...
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
StringRef getPrivateGlobalPrefix() const
static const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
This class is intended to be used as a base class for asm properties and features specific to the tar...
MCSymbol * getBeginSymbol()
void setGenDwarfRootFile(StringRef FileName, StringRef Buffer)
Specifies information about the "root file" for assembler clients (e.g., llvm-mc).
static StringRef getUnqualifiedName(StringRef Name)
bool isUndefined(bool SetUsed=true) const
isUndefined - Check if this symbol undefined (i.e., implicitly defined).
bool consume_front(StringRef Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
Triple - Helper class for working with autoconf configuration names.
The instances of the Type class are immutable: once they are created, they are never changed.
bool isTriviallyEmpty() const
Check if this twine is trivially empty; a false return value does not necessarily mean the twine is e...
bool isDefined() const
isDefined - Check if this symbol is defined (i.e., it has an address).
@ IMAGE_COMDAT_SELECT_ASSOCIATIVE
void setSymbolTableName(StringRef STN)
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
Tagged union holding either a T or a Error.
Instances of this class represent a single low-level machine instruction.
This represents a section on linux, lots of unix variants and some bare metal systems.
MCSymbol * createNamedTempSymbol()
Create a temporary symbol with a unique name whose name cannot be omitted in the symbol table.
void diagnose(const SMDiagnostic &SMD)
MCSymbol * lookupSymbol(const Twine &Name) const
Get the symbol for Name, or null.
bool isELFImplicitMergeableSectionNamePrefix(StringRef Name)
Expected< unsigned > getDwarfFile(StringRef Directory, StringRef FileName, unsigned FileNumber, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source, unsigned CUID)
Creates an entry in the dwarf file and directory tables.
void setSymbolValue(MCStreamer &Streamer, StringRef Sym, uint64_t Val)
Set value for a symbol.
MCSymbol * getOrCreateLSDASymbol(StringRef FuncName)
MCSectionMachO * getMachOSection(StringRef Segment, StringRef Section, unsigned TypeAndAttributes, unsigned Reserved2, SectionKind K, const char *BeginSymName=nullptr)
Return the MCSection for the specified mach-o section.
constexpr bool hasValue() const
void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")
Append to path.
static SectionKind getReadOnly()
Streaming machine code generation interface.
#define DWARF2_FLAG_IS_STMT
MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
bool isMultiSymbolsAllowed() const
void final(MD5Result &Result)
Finishes off the hash and puts the result in result.
bool isELFGenericMergeableSection(StringRef Name)
MCSection & getSection() const
Get the section associated with a defined, non-absolute symbol.
MCSectionSPIRV * getSPIRVSection()
Represents a location in source code.
This represents a section on wasm.
MCSectionGOFF * getGOFFSection(StringRef Section, SectionKind Kind, MCSection *Parent, const MCExpr *SubsectionId)
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
Holds state from .cv_file and .cv_loc directives for later emission.
MCInst * createMCInst()
Create and return a new MC instruction.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
static void defaultDiagHandler(const SMDiagnostic &SMD, bool, const SourceMgr &, std::vector< const MDNode * > &)
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
void setComdat(bool isComdat)
Environment getObjectFileType() const
uint16_t getDwarfVersion() const
virtual void emitAssignment(MCSymbol *Symbol, const MCExpr *Value)
Emit an assignment of Value to Symbol.
ObjectFormatType getObjectFormat() const
Get the object format for this triple.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
StringRef getCompilationDir() const
Get the compilation directory for DW_AT_comp_dir The compilation directory should be set with setComp...
MCSectionXCOFF * getXCOFFSection(StringRef Section, SectionKind K, Optional< XCOFF::CsectProperties > CsectProp=None, bool MultiSymbolsAllowed=false, const char *BeginSymName=nullptr, Optional< XCOFF::DwarfSectionSubtypeFlags > DwarfSubtypeFlags=None)
unsigned getMainFileID() const
void registerInlineAsmLabel(MCSymbol *Sym)
registerInlineAsmLabel - Records that the name is a label referenced in inline assembly.
StringRef getName() const
getName - Get the symbol name.
static SectionKind getText()
StringRef getMappingClassString(XCOFF::StorageMappingClass SMC)
MCSectionCOFF * getAssociativeCOFFSection(MCSectionCOFF *Sec, const MCSymbol *KeySym, unsigned UniqueID=GenericSectionID)
Gets or creates a section equivalent to Sec that is associated with the section containing KeySym.
MCSectionWasm * getWasmSection(const Twine &Section, SectionKind K, unsigned Flags=0)
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
const MemoryBuffer * getMemoryBuffer(unsigned i) const
std::string str() const
Return the twine contents as a std::string.
virtual StringRef getBufferIdentifier() const
Return an identifier for this buffer, typically the filename it was read from.
bool hasXCOFFSection(StringRef Section, XCOFF::CsectProperties CsectProp) const
void append(StringRef RHS)
Append from a StringRef.
unsigned getCharacteristics() const
constexpr LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
void print(const char *ProgName, raw_ostream &S, bool ShowColors=true, bool ShowKindLabel=true) const
MCDwarfLineTable & getMCDwarfLineTable(unsigned CUID)
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
LLVM_NODISCARD char front() const
front - Get the first character in the string.
ValueTy lookup(StringRef Key) const
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
MCSymbol * createLinkerPrivateTempSymbol()
Create and return a new linker temporary symbol with a unique but unspecified name.
virtual bool isValidUnquotedName(StringRef Name) const
Return true if the identifier Name does not need quotes to be syntactically correct.
initializer< Ty > init(const Ty &Val)
static constexpr unsigned NonUniqueID
MCSectionELF * createELFGroupSection(const MCSymbolELF *Group, bool IsComdat)
MCContext(const Triple &TheTriple, const MCAsmInfo *MAI, const MCRegisterInfo *MRI, const MCSubtargetInfo *MSTI, const SourceMgr *Mgr=nullptr, MCTargetOptions const *TargetOpts=nullptr, bool DoAutoReset=true, StringRef Swift5ReflSegmentName={})
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This represents a section on Windows.
static cl::opt< char * > AsSecureLogFileName("as-secure-log-file-name", cl::desc("As secure log file name (initialized from " "AS_SECURE_LOG_FILE env variable)"), cl::init(getenv("AS_SECURE_LOG_FILE")), cl::Hidden)
void reportError(SMLoc L, const Twine &Msg)
print Print MemDeps of function
const SmallVectorImpl< MCDwarfFile > & getMCDwarfFiles() const
MCSymbol * getOrCreateFrameAllocSymbol(StringRef FuncName, unsigned Idx)
Gets a symbol that will be defined to the final stack offset of a local variable after codegen.
void recordELFMergeableSectionInfo(StringRef SectionName, unsigned Flags, unsigned UniqueID, unsigned EntrySize)
void initInlineSourceManager()
Instances of this class represent the information from a dwarf .loc directive.
static void DiagHandler(const SMDiagnostic &Diag, void *Context)
StringRef - Represent a constant reference to a string, i.e.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
StringRef getUnqualifiedName() const
bool isValidDwarfFileNumber(unsigned FileNumber, unsigned CUID=0)
isValidDwarfFileNumber - takes a dwarf file number and returns true if it currently is assigned and f...
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
void setMCLineTableRootFile(unsigned CUID, StringRef CompilationDir, StringRef Filename, Optional< MD5::MD5Result > Checksum, Optional< StringRef > Source)
Specifies the "root" file and directory of the compilation unit.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
MCSectionCOFF * getCOFFSection(StringRef Section, unsigned Characteristics, SectionKind Kind, StringRef COMDATSymName, int Selection, unsigned UniqueID=GenericSectionID, const char *BeginSymName=nullptr)
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
unsigned const MachineRegisterInfo * MRI
MCSymbol * getDirectionalLocalSymbol(unsigned LocalLabelVal, bool Before)
Create and return a directional local symbol for numbered label (used for "1b" or 1f" references).
const CustomOperand< const MCSubtargetInfo & > Msg[]
Instances of this class represent a label name in the MC file, and MCLabel are created and uniqued by...
StringRef getName() const
bool isOSWindows() const
Tests whether the OS is Windows.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
constexpr bool empty(const T &RangeOrContainer)
Test whether RangeOrContainer is empty. Similar to C++17 std::empty.
SectionKind - This is a simple POD value that classifies the properties of a section.
LLVM_NODISCARD StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
This represents a section on a Mach-O system (used by Mac OS X).
void renameELFSection(MCSectionELF *Section, StringRef Name)
StringRef str() const
Explicit conversion to StringRef.
SMDiagnostic GetMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg, ArrayRef< SMRange > Ranges={}, ArrayRef< SMFixIt > FixIts={}) const
Return an SMDiagnostic at the specified location with the specified string.
amdgpu AMDGPU DAG DAG Pattern Instruction Selection
SectionKind getKind() const
bool is_separator(char value, Style style=Style::native)
Check whether the given char is a path separator on the host OS.
StorageMappingClass MappingClass
void setFragment(MCFragment *F) const
Mark the symbol as defined in the fragment F.
const std::string & getMainFileName() const
Get the main file name for use in error messages and debug info.
Optional< unsigned > getELFUniqueIDForEntsize(StringRef SectionName, unsigned Flags, unsigned EntrySize)
Return the unique ID of the section with the given name, flags and entry size, if it exists.
bool isInSection() const
isInSection - Check if this symbol is defined in some section (i.e., it is defined but not absolute).
COFFYAML::WeakExternalCharacteristics Characteristics
void addDebugPrefixMapEntry(const std::string &From, const std::string &To)
Add an entry to the debug prefix map.
A raw_ostream that writes to an SmallVector or SmallString.
virtual bool mayHaveInstructions(MCSection &Sec) const
MCSubtargetInfo & getSubtargetCopy(const MCSubtargetInfo &STI)
void remove_filename(SmallVectorImpl< char > &path, Style style=Style::native)
Remove the last component from path unless it is the root dir.
void reset()
reset - return object to right after construction state to prepare to process a new module
MCSectionELF * createELFRelSection(const Twine &Name, unsigned Type, unsigned Flags, unsigned EntrySize, const MCSymbolELF *Group, const MCSectionELF *RelInfoSection)
MCSymbol * createDirectionalLocalSymbol(unsigned LocalLabelVal)
Create the definition of a directional local symbol for numbered label (used for "1:" definitions).
BlockVerifier::State From
MCSectionELF * getELFNamedSection(const Twine &Prefix, const Twine &Suffix, unsigned Type, unsigned Flags, unsigned EntrySize=0)
Get a section with the provided group identifier.
Fragment for data and encoded instructions.
Generic base class for all target subtargets.
Base class for the full range of assembler expressions which are needed for parsing.
unsigned getNumBuffers() const
void finalizeDwarfSections(MCStreamer &MCOS)
Remove empty sections from SectionsForRanges, to avoid generating useless debug info for them.
void reportWarning(SMLoc L, const Twine &Msg)
raw_ostream & write_hex(unsigned long long N)
Output N in hexadecimal, without any prefix or padding.