42
42
#include < vector>
43
43
44
44
namespace llvm {
45
+
45
46
extern cl::opt<bool > EnableCSPreInliner;
46
47
extern cl::opt<bool > UseContextCostForPreInliner;
47
- } // namespace llvm
48
-
49
- using namespace llvm ;
50
- using namespace sampleprof ;
51
- using namespace llvm ::object;
52
48
53
- namespace llvm {
54
49
namespace sampleprof {
55
50
56
51
class ProfiledBinary ;
@@ -303,34 +298,34 @@ class ProfiledBinary {
303
298
304
299
bool IsCOFF = false ;
305
300
306
- void setPreferredTextSegmentAddresses (const ObjectFile *O);
301
+ void setPreferredTextSegmentAddresses (const object:: ObjectFile *O);
307
302
308
303
template <class ELFT >
309
- void setPreferredTextSegmentAddresses (const ELFFile<ELFT> &Obj,
304
+ void setPreferredTextSegmentAddresses (const object:: ELFFile<ELFT> &Obj,
310
305
StringRef FileName);
311
- void setPreferredTextSegmentAddresses (const COFFObjectFile *Obj,
306
+ void setPreferredTextSegmentAddresses (const object:: COFFObjectFile *Obj,
312
307
StringRef FileName);
313
308
314
- void checkPseudoProbe (const ELFObjectFileBase *Obj);
309
+ void checkPseudoProbe (const object:: ELFObjectFileBase *Obj);
315
310
316
- void decodePseudoProbe (const ELFObjectFileBase *Obj);
311
+ void decodePseudoProbe (const object:: ELFObjectFileBase *Obj);
317
312
318
- void
319
- checkUseFSDiscriminator ( const ObjectFile *Obj,
320
- std::map<SectionRef, SectionSymbolsTy> &AllSymbols);
313
+ void checkUseFSDiscriminator (
314
+ const object:: ObjectFile *Obj,
315
+ std::map<object:: SectionRef, SectionSymbolsTy> &AllSymbols);
321
316
322
317
// Set up disassembler and related components.
323
- void setUpDisassembler (const ObjectFile *Obj);
318
+ void setUpDisassembler (const object:: ObjectFile *Obj);
324
319
symbolize::LLVMSymbolizer::Options getSymbolizerOpts () const ;
325
320
326
321
// Load debug info of subprograms from DWARF section.
327
- void loadSymbolsFromDWARF (ObjectFile &Obj);
322
+ void loadSymbolsFromDWARF (object:: ObjectFile &Obj);
328
323
329
324
// Load debug info from DWARF unit.
330
325
void loadSymbolsFromDWARFUnit (DWARFUnit &CompilationUnit);
331
326
332
327
// Create elf symbol to its start address mapping.
333
- void populateElfSymbolAddressList (const ELFObjectFileBase *O);
328
+ void populateElfSymbolAddressList (const object:: ELFObjectFileBase *O);
334
329
335
330
// A function may be spilt into multiple non-continuous address ranges. We use
336
331
// this to set whether start a function range is the real entry of the
@@ -341,11 +336,12 @@ class ProfiledBinary {
341
336
void warnNoFuncEntry ();
342
337
343
338
// / Dissassemble the text section and build various address maps.
344
- void disassemble (const ObjectFile *O);
339
+ void disassemble (const object:: ObjectFile *O);
345
340
346
341
// / Helper function to dissassemble the symbol and extract info for unwinding
347
342
bool dissassembleSymbol (std::size_t SI, ArrayRef<uint8_t > Bytes,
348
- SectionSymbolsTy &Symbols, const SectionRef &Section);
343
+ SectionSymbolsTy &Symbols,
344
+ const object::SectionRef &Section);
349
345
// / Symbolize a given instruction pointer and return a full call context.
350
346
SampleContextFrameVector symbolize (const InstructionPointer &IP,
351
347
bool UseCanonicalFnName = false ,
0 commit comments