|
13 | 13 | #include "llvm/ADT/DenseMap.h" |
14 | 14 | #include "llvm/CodeGen/DIE.h" |
15 | 15 | #include "llvm/DebugInfo/DWARF/DWARFUnit.h" |
| 16 | +#include "llvm/Support/Compiler.h" |
16 | 17 | #include <optional> |
17 | 18 |
|
18 | 19 | namespace llvm { |
@@ -142,9 +143,9 @@ class CompileUnit { |
142 | 143 |
|
143 | 144 | bool hasODR() const { return HasODR; } |
144 | 145 | bool isClangModule() const { return !ClangModuleName.empty(); } |
145 | | - uint16_t getLanguage(); |
| 146 | + LLVM_ABI uint16_t getLanguage(); |
146 | 147 | /// Return the DW_AT_LLVM_sysroot of the compile unit or an empty StringRef. |
147 | | - StringRef getSysRoot(); |
| 148 | + LLVM_ABI StringRef getSysRoot(); |
148 | 149 |
|
149 | 150 | const std::string &getClangModuleName() const { return ClangModuleName; } |
150 | 151 |
|
@@ -185,60 +186,62 @@ class CompileUnit { |
185 | 186 | /// Mark every DIE in this unit as kept. This function also |
186 | 187 | /// marks variables as InDebugMap so that they appear in the |
187 | 188 | /// reconstructed accelerator tables. |
188 | | - void markEverythingAsKept(); |
| 189 | + LLVM_ABI void markEverythingAsKept(); |
189 | 190 |
|
190 | 191 | /// Compute the end offset for this unit. Must be called after the CU's DIEs |
191 | 192 | /// have been cloned. \returns the next unit offset (which is also the |
192 | 193 | /// current debug_info section size). |
193 | | - uint64_t computeNextUnitOffset(uint16_t DwarfVersion); |
| 194 | + LLVM_ABI uint64_t computeNextUnitOffset(uint16_t DwarfVersion); |
194 | 195 |
|
195 | 196 | /// Keep track of a forward reference to DIE \p Die in \p RefUnit by \p |
196 | 197 | /// Attr. The attribute should be fixed up later to point to the absolute |
197 | 198 | /// offset of \p Die in the debug_info section or to the canonical offset of |
198 | 199 | /// \p Ctxt if it is non-null. |
199 | | - void noteForwardReference(DIE *Die, const CompileUnit *RefUnit, |
200 | | - DeclContext *Ctxt, PatchLocation Attr); |
| 200 | + LLVM_ABI void noteForwardReference(DIE *Die, const CompileUnit *RefUnit, |
| 201 | + DeclContext *Ctxt, PatchLocation Attr); |
201 | 202 |
|
202 | 203 | /// Apply all fixups recorded by noteForwardReference(). |
203 | | - void fixupForwardReferences(); |
| 204 | + LLVM_ABI void fixupForwardReferences(); |
204 | 205 |
|
205 | 206 | /// Add the low_pc of a label that is relocated by applying |
206 | 207 | /// offset \p PCOffset. |
207 | | - void addLabelLowPc(uint64_t LabelLowPc, int64_t PcOffset); |
| 208 | + LLVM_ABI void addLabelLowPc(uint64_t LabelLowPc, int64_t PcOffset); |
208 | 209 |
|
209 | 210 | /// Add a function range [\p LowPC, \p HighPC) that is relocated by applying |
210 | 211 | /// offset \p PCOffset. |
211 | | - void addFunctionRange(uint64_t LowPC, uint64_t HighPC, int64_t PCOffset); |
| 212 | + LLVM_ABI void addFunctionRange(uint64_t LowPC, uint64_t HighPC, |
| 213 | + int64_t PCOffset); |
212 | 214 |
|
213 | 215 | /// Keep track of a DW_AT_range attribute that we will need to patch up later. |
214 | | - void noteRangeAttribute(const DIE &Die, PatchLocation Attr); |
| 216 | + LLVM_ABI void noteRangeAttribute(const DIE &Die, PatchLocation Attr); |
215 | 217 |
|
216 | 218 | /// Keep track of a location attribute pointing to a location list in the |
217 | 219 | /// debug_loc section. |
218 | | - void noteLocationAttribute(PatchLocation Attr); |
| 220 | + LLVM_ABI void noteLocationAttribute(PatchLocation Attr); |
219 | 221 |
|
220 | 222 | // Record that the given DW_AT_LLVM_stmt_sequence attribute may need to be |
221 | 223 | // patched later. |
222 | | - void noteStmtSeqListAttribute(PatchLocation Attr); |
| 224 | + LLVM_ABI void noteStmtSeqListAttribute(PatchLocation Attr); |
223 | 225 |
|
224 | 226 | /// Add a name accelerator entry for \a Die with \a Name. |
225 | | - void addNamespaceAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name); |
| 227 | + LLVM_ABI void addNamespaceAccelerator(const DIE *Die, |
| 228 | + DwarfStringPoolEntryRef Name); |
226 | 229 |
|
227 | 230 | /// Add a name accelerator entry for \a Die with \a Name. |
228 | | - void addNameAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, |
229 | | - bool SkipPubnamesSection = false); |
| 231 | + LLVM_ABI void addNameAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, |
| 232 | + bool SkipPubnamesSection = false); |
230 | 233 |
|
231 | 234 | /// Add various accelerator entries for \p Die with \p Name which is stored |
232 | 235 | /// in the string table at \p Offset. \p Name must be an Objective-C |
233 | 236 | /// selector. |
234 | | - void addObjCAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, |
235 | | - bool SkipPubnamesSection = false); |
| 237 | + LLVM_ABI void addObjCAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, |
| 238 | + bool SkipPubnamesSection = false); |
236 | 239 |
|
237 | 240 | /// Add a type accelerator entry for \p Die with \p Name which is stored in |
238 | 241 | /// the string table at \p Offset. |
239 | | - void addTypeAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, |
240 | | - bool ObjcClassImplementation, |
241 | | - uint32_t QualifiedNameHash); |
| 242 | + LLVM_ABI void addTypeAccelerator(const DIE *Die, DwarfStringPoolEntryRef Name, |
| 243 | + bool ObjcClassImplementation, |
| 244 | + uint32_t QualifiedNameHash); |
242 | 245 |
|
243 | 246 | struct AccelInfo { |
244 | 247 | /// Name of the entry. |
|
0 commit comments