LLVM  12.0.0git
DWARFLocationExpression.h
Go to the documentation of this file.
1 //===- DWARFLocationExpression.h --------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_DEBUGINFO_DWARF_DWARFLOCATIONEXPRESSION_H
10 #define LLVM_DEBUGINFO_DWARF_DWARFLOCATIONEXPRESSION_H
11 
12 #include "llvm/ADT/Optional.h"
14 
15 namespace llvm {
16 
17 class raw_ostream;
18 
19 /// Represents a single DWARF expression, whose value is location-dependent.
20 /// Typically used in DW_AT_location attributes to describe the location of
21 /// objects.
23  /// The address range in which this expression is valid. None denotes a
24  /// default entry which is valid in addresses not covered by other location
25  /// expressions, or everywhere if there are no other expressions.
27 
28  /// The expression itself.
30 };
31 
32 inline bool operator==(const DWARFLocationExpression &L,
33  const DWARFLocationExpression &R) {
34  return L.Range == R.Range && L.Expr == R.Expr;
35 }
36 
37 inline bool operator!=(const DWARFLocationExpression &L,
38  const DWARFLocationExpression &R) {
39  return !(L == R);
40 }
41 
43 
44 /// Represents a set of absolute location expressions.
45 using DWARFLocationExpressionsVector = std::vector<DWARFLocationExpression>;
46 
47 } // end namespace llvm
48 
49 #endif // LLVM_DEBUGINFO_DWARF_DWARFLOCATIONEXPRESSION_H
This class represents lattice values for constants.
Definition: AllocatorList.h:23
SmallVector< uint8_t, 4 > Expr
The expression itself.
Represents a single DWARF expression, whose value is location-dependent.
bool operator!=(uint64_t V1, const APInt &V2)
Definition: APInt.h:2029
std::vector< DWARFLocationExpression > DWARFLocationExpressionsVector
Represents a set of absolute location expressions.
raw_ostream & operator<<(raw_ostream &OS, const APInt &I)
Definition: APInt.h:2099
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:46
Optional< DWARFAddressRange > Range
The address range in which this expression is valid.
bool operator==(uint64_t V1, const APInt &V2)
Definition: APInt.h:2027