LLVM: include/llvm/Support/SMLoc.h Source File (original) (raw)
Go to the documentation of this file.
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_SUPPORT_SMLOC_H
15#define LLVM_SUPPORT_SMLOC_H
16
17#include
18
19namespace llvm {
20
21
23 const char *Ptr = nullptr;
24
25public:
26 constexpr SMLoc() = default;
27
28 constexpr bool isValid() const { return Ptr != nullptr; }
29
32
33 constexpr const char *getPointer() const { return Ptr; }
34
37 L.Ptr = Ptr;
38 return L;
39 }
40};
41
42
43
44
45
46
48public:
50
54 "Start and End should either both be valid or both be invalid!");
55 }
56
58};
59
60}
61
62#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Represents a location in source code.
Definition SMLoc.h:22
constexpr bool operator==(SMLoc RHS) const
Definition SMLoc.h:30
static SMLoc getFromPointer(const char *Ptr)
Definition SMLoc.h:35
constexpr const char * getPointer() const
Definition SMLoc.h:33
constexpr bool isValid() const
Definition SMLoc.h:28
constexpr SMLoc()=default
constexpr bool operator!=(SMLoc RHS) const
Definition SMLoc.h:31
bool isValid() const
Definition SMLoc.h:57
SMLoc Start
Definition SMLoc.h:49
SMLoc End
Definition SMLoc.h:49
SMRange(SMLoc St, SMLoc En)
Definition SMLoc.h:52
This is an optimization pass for GlobalISel generic memory operations.