LLVM: lib/Target/NVPTX/MCTargetDesc/NVPTXTargetStreamer.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
21
22using namespace llvm;
23
24
25
26
29
33
35 for (const std::string &S : DwarfFiles)
37 DwarfFiles.clear();
38}
39
44
48
51
52
53 if (!Section || Section->isText())
54 return false;
87}
88
92 assert(!SubSection && "SubSection is not null!");
94
96 OS << "\t}\n";
98
100 OS << "\t.section\t" << Section->getName() << '\n';
101
102 OS << "\t{\n";
103 HasSections = true;
104 }
105}
106
109
110
111
112#if 0
115 unsigned NumElements = Data.size();
116 const unsigned MaxLen = 40;
117 unsigned NumChunks = 1 + ((NumElements - 1) / MaxLen);
118
119
120 for (unsigned I = 0; I < NumChunks; ++I) {
123
125 for (auto It = std::next(Data.bytes_begin(), I * MaxLen),
126 End = (I == NumChunks - 1)
127 ? Data.bytes_end()
128 : std::next(Data.bytes_begin(), (I + 1) * MaxLen);
129 It != End; ++It) {
130 OS << Label << (unsigned)*It;
132 Label = ",";
133 }
135 }
136#endif
137}
138
145 return;
146 }
147
148 }
149
151}
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static bool isDwarfSection(const MCObjectFileInfo *FI, const MCSection *Section)
Definition NVPTXTargetStreamer.cpp:49
This class is intended to be used as a base class for asm properties and features specific to the tar...
const char * getData8bitsDirective() const
const MCObjectFileInfo * getObjectFileInfo() const
Base class for the full range of assembler expressions which are needed for parsing.
@ SymbolRef
References to labels and assigned expressions.
MCSection * getDwarfAccelTypesSection() const
MCSection * getDwarfGnuPubNamesSection() const
MCSection * getDwarfStrOffDWOSection() const
MCSection * getDwarfRangesSection() const
MCSection * getDwarfAccelNamespaceSection() const
MCSection * getDwarfLineDWOSection() const
MCSection * getDwarfStrOffSection() const
MCSection * getDwarfInfoDWOSection() const
MCSection * getDwarfTypesDWOSection() const
MCSection * getDwarfPubNamesSection() const
MCSection * getDwarfStrSection() const
MCSection * getDwarfLineStrSection() const
MCSection * getDwarfTUIndexSection() const
MCSection * getDwarfDebugNamesSection() const
MCSection * getDwarfAddrSection() const
MCSection * getDwarfLineSection() const
MCSection * getDwarfInfoSection() const
MCSection * getDwarfFrameSection() const
MCSection * getDwarfPubTypesSection() const
const MCSection * getDwarfDebugInlineSection() const
MCSection * getDwarfGnuPubTypesSection() const
MCSection * getDwarfStrDWOSection() const
MCSection * getDwarfAccelNamesSection() const
MCSection * getDwarfAbbrevDWOSection() const
MCSection * getDwarfAbbrevSection() const
MCSection * getDwarfSwiftASTSection() const
MCSection * getDwarfCUIndexSection() const
MCSection * getDwarfMacinfoSection() const
MCSection * getDwarfLocDWOSection() const
MCSection * getDwarfARangesSection() const
MCSection * getDwarfAccelObjCSection() const
MCSection * getDwarfLocSection() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Streaming machine code generation interface.
MCContext & getContext() const
void emitRawText(const Twine &String)
If this file is backed by a assembly streamer, this dumps the specified string in the output ....
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
StringRef getName() const
getName - Get the symbol name.
virtual void emitValue(const MCExpr *Value)
MCStreamer & getStreamer()
virtual void emitRawBytes(StringRef Data)
Emit the bytes in Data into the output.
MCTargetStreamer(MCStreamer &S)
~NVPTXAsmTargetStreamer() override
NVPTXAsmTargetStreamer(MCStreamer &S)
Definition NVPTXTargetStreamer.cpp:30
void emitDwarfFileDirective(StringRef Directive) override
Record DWARF file directives for later output.
Definition NVPTXTargetStreamer.cpp:45
NVPTXTargetStreamer(MCStreamer &S)
Definition NVPTXTargetStreamer.cpp:27
void outputDwarfFileDirectives()
Outputs the list of the DWARF '.file' directives to the streamer.
Definition NVPTXTargetStreamer.cpp:34
void emitRawBytes(StringRef Data) override
Emit the bytes in Data into the output.
Definition NVPTXTargetStreamer.cpp:107
void changeSection(const MCSection *CurSection, MCSection *Section, uint32_t SubSection, raw_ostream &OS) override
Update streamer for a new active section.
Definition NVPTXTargetStreamer.cpp:89
~NVPTXTargetStreamer() override
void emitValue(const MCExpr *Value) override
Makes sure that labels are mangled the same way as the actual symbols.
Definition NVPTXTargetStreamer.cpp:139
void closeLastSection()
Close last section.
Definition NVPTXTargetStreamer.cpp:40
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an SmallVector or SmallString.
StringRef str() const
Return a StringRef for the vector contents.
std::string getValidPTXIdentifier(StringRef Name)
This is an optimization pass for GlobalISel generic memory operations.
FunctionAddr VTableAddr uintptr_t uintptr_t Data
decltype(auto) cast(const From &Val)
cast - Return the argument parameter cast to the specified type.