4242#include < vector>
4343
4444namespace llvm {
45+
4546extern cl::opt<bool > EnableCSPreInliner;
4647extern cl::opt<bool > UseContextCostForPreInliner;
47- } // namespace llvm
48-
49- using namespace llvm ;
50- using namespace sampleprof ;
51- using namespace llvm ::object;
5248
53- namespace llvm {
5449namespace sampleprof {
5550
5651class ProfiledBinary ;
@@ -303,34 +298,34 @@ class ProfiledBinary {
303298
304299 bool IsCOFF = false ;
305300
306- void setPreferredTextSegmentAddresses (const ObjectFile *O);
301+ void setPreferredTextSegmentAddresses (const object:: ObjectFile *O);
307302
308303 template <class ELFT >
309- void setPreferredTextSegmentAddresses (const ELFFile<ELFT> &Obj,
304+ void setPreferredTextSegmentAddresses (const object:: ELFFile<ELFT> &Obj,
310305 StringRef FileName);
311- void setPreferredTextSegmentAddresses (const COFFObjectFile *Obj,
306+ void setPreferredTextSegmentAddresses (const object:: COFFObjectFile *Obj,
312307 StringRef FileName);
313308
314- void checkPseudoProbe (const ELFObjectFileBase *Obj);
309+ void checkPseudoProbe (const object:: ELFObjectFileBase *Obj);
315310
316- void decodePseudoProbe (const ELFObjectFileBase *Obj);
311+ void decodePseudoProbe (const object:: ELFObjectFileBase *Obj);
317312
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);
321316
322317 // Set up disassembler and related components.
323- void setUpDisassembler (const ObjectFile *Obj);
318+ void setUpDisassembler (const object:: ObjectFile *Obj);
324319 symbolize::LLVMSymbolizer::Options getSymbolizerOpts () const ;
325320
326321 // Load debug info of subprograms from DWARF section.
327- void loadSymbolsFromDWARF (ObjectFile &Obj);
322+ void loadSymbolsFromDWARF (object:: ObjectFile &Obj);
328323
329324 // Load debug info from DWARF unit.
330325 void loadSymbolsFromDWARFUnit (DWARFUnit &CompilationUnit);
331326
332327 // Create elf symbol to its start address mapping.
333- void populateElfSymbolAddressList (const ELFObjectFileBase *O);
328+ void populateElfSymbolAddressList (const object:: ELFObjectFileBase *O);
334329
335330 // A function may be spilt into multiple non-continuous address ranges. We use
336331 // this to set whether start a function range is the real entry of the
@@ -341,11 +336,12 @@ class ProfiledBinary {
341336 void warnNoFuncEntry ();
342337
343338 // / Dissassemble the text section and build various address maps.
344- void disassemble (const ObjectFile *O);
339+ void disassemble (const object:: ObjectFile *O);
345340
346341 // / Helper function to dissassemble the symbol and extract info for unwinding
347342 bool dissassembleSymbol (std::size_t SI, ArrayRef<uint8_t > Bytes,
348- SectionSymbolsTy &Symbols, const SectionRef &Section);
343+ SectionSymbolsTy &Symbols,
344+ const object::SectionRef &Section);
349345 // / Symbolize a given instruction pointer and return a full call context.
350346 SampleContextFrameVector symbolize (const InstructionPointer &IP,
351347 bool UseCanonicalFnName = false ,
0 commit comments