LLVM: lib/DebugInfo/GSYM/LookupResult.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

14

15using namespace llvm;

16using namespace gsym;

17

19 std::string Fullpath;

21 if (Locations[Index].Dir.empty()) {

23 Fullpath = std::string(Locations[Index].Dir);

24 } else {

28 Fullpath.assign(Storage.begin(), Storage.end());

29 }

32 }

33 return Fullpath;

34}

35

37 OS << SL.Name;

39 OS << " + " << SL.Offset;

41 OS << " @ ";

43 OS << SL.Dir;

45 OS << '\\';

46 else

47 OS << '/';

48 }

50 OS << "";

51 else

52 OS << SL.Base;

53 OS << ':' << SL.Line;

54 }

55 return OS;

56}

57

60 auto NumLocations = LR.Locations.size();

61 for (size_t I = 0; I < NumLocations; ++I) {

62 if (I > 0) {

63 OS << '\n';

65 }

66 const bool IsInlined = I + 1 != NumLocations;

68 if (IsInlined)

69 OS << " [inlined]";

70 }

71

73 OS << "\n CallSites: ";

75 if (i > 0)

76 OS << ", ";

78 }

79 }

80

81 OS << '\n';

82 return OS;

83}

This file defines the SmallString class.

SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...

constexpr bool empty() const

empty - Check if the string is empty.

constexpr size_t size() const

size - Get the string size.

bool contains(StringRef Other) const

Return true if the given string is a substring of *this, and false otherwise.

This class implements an extremely fast bulk output stream that can only output to a stream.

raw_ostream & indent(unsigned NumSpaces)

indent - Insert 'NumSpaces' spaces.

LLVM_ABI raw_ostream & operator<<(raw_ostream &OS, const CallSiteInfo &CSI)

LLVM_ABI void append(SmallVectorImpl< char > &path, const Twine &a, const Twine &b="", const Twine &c="", const Twine &d="")

Append to path.

This is an optimization pass for GlobalISel generic memory operations.

uint64_t LookupAddr

The address that this lookup pertains to.

LLVM_ABI std::string getSourceFile(uint32_t Index) const

Definition LookupResult.cpp:18

std::vector< StringRef > CallSiteFuncRegex

Function name regex patterns associated with a call site at the lookup address.

SourceLocations Locations

The source locations that match this address.

StringRef Base

Line entry source file basename.

uint32_t Line

Source file line number.

uint32_t Offset

Byte size offset within the named function.

StringRef Dir

Line entry source file directory path.

StringRef Name

Function or symbol name.