clang 24.0.0git
SourceLocation.h
Go to the documentation of this file.
1//===- SourceLocation.h - Compact identifier for Source Files ---*- 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/// \file
10/// Defines the clang::SourceLocation class and associated facilities.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_BASIC_SOURCELOCATION_H
15#define LLVM_CLANG_BASIC_SOURCELOCATION_H
16
18#include "clang/Basic/LLVM.h"
19#include "llvm/ADT/StringRef.h"
20#include <cassert>
21#include <cstdint>
22#include <string>
23#include <utility>
24
25namespace llvm {
26
27class FoldingSetNodeID;
28template <typename T, typename Enable> struct FoldingSetTrait;
29
30} // namespace llvm
31
32namespace clang {
33
34class SourceManager;
35
36/// An opaque identifier used by SourceManager which refers to a
37/// source file (MemoryBuffer) along with its \#include path and \#line data.
38///
39class FileID {
40 /// A mostly-opaque identifier, where 0 is "invalid", >0 is
41 /// this module, and <-1 is something loaded from another module.
42 int ID = 0;
43
44public:
45 bool isValid() const { return ID != 0; }
46 bool isInvalid() const { return ID == 0; }
47
48 bool operator==(const FileID &RHS) const { return ID == RHS.ID; }
49 bool operator<(const FileID &RHS) const { return ID < RHS.ID; }
50 bool operator<=(const FileID &RHS) const { return ID <= RHS.ID; }
51 bool operator!=(const FileID &RHS) const { return !(*this == RHS); }
52 bool operator>(const FileID &RHS) const { return RHS < *this; }
53 bool operator>=(const FileID &RHS) const { return RHS <= *this; }
54
55 static FileID getSentinel() { return get(-1); }
56 unsigned getHashValue() const {
57 // Multiply by 37 to spread the keys to avoid clustering in DenseMap.
58 return static_cast<unsigned>(ID) * 37U;
59 }
60
61 /// Returns the raw integer representation of this FileID.
62 int getOpaqueValue() const { return ID; }
63
64private:
65 friend class ASTWriter;
66 friend class ASTReader;
67 friend class SourceManager;
69
70 static FileID get(int V) {
71 FileID F;
72 F.ID = V;
73 return F;
74 }
75};
76
77using FileIDAndOffset = std::pair<FileID, unsigned>;
78
79/// Encodes a location in the source. The SourceManager can decode this
80/// to get at the full include stack, line and column information.
81///
82/// Technically, a source location is simply an offset into the manager's view
83/// of the input source, which is all input buffers (including macro
84/// expansions) concatenated in an effectively arbitrary order. The manager
85/// actually maintains two blocks of input buffers. One, starting at offset
86/// 0 and growing upwards, contains all buffers from this module. The other,
87/// starting at the highest possible offset and growing downwards, contains
88/// buffers of loaded modules.
89///
90/// In addition, one bit of SourceLocation is used for quick access to the
91/// information whether the location is in a file or a macro expansion.
92///
93/// SourceLocation operates on a byte level, i.e. offsets describe
94/// byte distances, but in most cases, they are used on a token level,
95/// where a SourceLocation points to the first byte of a lexer token.
96///
97/// It is important that this type remains small. It is currently 32 bits wide.
99 friend class ASTReader;
100 friend class ASTWriter;
101 friend class SourceManager;
102 friend struct llvm::FoldingSetTrait<SourceLocation, void>;
104
105public:
107 using IntTy = int32_t;
108
109private:
110 UIntTy ID = 0;
111
112 enum : UIntTy { MacroIDBit = 1ULL << (8 * sizeof(UIntTy) - 1) };
113
114public:
115 bool isFileID() const { return (ID & MacroIDBit) == 0; }
116 bool isMacroID() const { return (ID & MacroIDBit) != 0; }
117
118 /// Return true if this is a valid SourceLocation object.
119 ///
120 /// Invalid SourceLocations are often used when events have no corresponding
121 /// location in the source (e.g. a diagnostic is required for a command line
122 /// option).
123 bool isValid() const { return ID != 0; }
124 bool isInvalid() const { return ID == 0; }
125
126private:
127 /// Return the offset into the manager's global input view.
128 UIntTy getOffset() const { return ID & ~MacroIDBit; }
129
130 static SourceLocation getFileLoc(UIntTy ID) {
131 assert((ID & MacroIDBit) == 0 && "Ran out of source locations!");
132 SourceLocation L;
133 L.ID = ID;
134 return L;
135 }
136
137 static SourceLocation getMacroLoc(UIntTy ID) {
138 assert((ID & MacroIDBit) == 0 && "Ran out of source locations!");
139 SourceLocation L;
140 L.ID = MacroIDBit | ID;
141 return L;
142 }
143
144public:
145 /// Return a source location with the specified offset from this
146 /// SourceLocation.
148 assert(((getOffset()+Offset) & MacroIDBit) == 0 && "offset overflow");
150 L.ID = ID+Offset;
151 return L;
152 }
153
154 /// When a SourceLocation itself cannot be used, this returns
155 /// an (opaque) 32-bit integer encoding for it.
156 ///
157 /// This should only be passed to SourceLocation::getFromRawEncoding, it
158 /// should not be inspected directly.
159 UIntTy getRawEncoding() const { return ID; }
160
161 /// Turn a raw encoding of a SourceLocation object into
162 /// a real SourceLocation.
163 ///
164 /// \see getRawEncoding.
167 X.ID = Encoding;
168 return X;
169 }
170
171 /// When a SourceLocation itself cannot be used, this returns
172 /// an (opaque) pointer encoding for it.
173 ///
174 /// This should only be passed to SourceLocation::getFromPtrEncoding, it
175 /// should not be inspected directly.
176 void* getPtrEncoding() const {
177 // Double cast to avoid a warning "cast to pointer from integer of different
178 // size".
179 return (void*)(uintptr_t)getRawEncoding();
180 }
181
182 /// Turn a pointer encoding of a SourceLocation object back
183 /// into a real SourceLocation.
184 static SourceLocation getFromPtrEncoding(const void *Encoding) {
186 }
187
189 return Start.isValid() && Start.isFileID() && End.isValid() &&
190 End.isFileID();
191 }
192
193 unsigned getHashValue() const;
194 void print(raw_ostream &OS, const SourceManager &SM) const;
195 std::string printToString(const SourceManager &SM) const;
196 void dump(const SourceManager &SM) const;
197};
198
199inline bool operator==(const SourceLocation &LHS, const SourceLocation &RHS) {
200 return LHS.getRawEncoding() == RHS.getRawEncoding();
201}
202
203inline bool operator!=(const SourceLocation &LHS, const SourceLocation &RHS) {
204 return !(LHS == RHS);
205}
206
207// Ordering is meaningful only if LHS and RHS have the same FileID!
208// Otherwise use SourceManager::isBeforeInTranslationUnit().
209inline bool operator<(const SourceLocation &LHS, const SourceLocation &RHS) {
210 return LHS.getRawEncoding() < RHS.getRawEncoding();
211}
212inline bool operator>(const SourceLocation &LHS, const SourceLocation &RHS) {
213 return LHS.getRawEncoding() > RHS.getRawEncoding();
214}
215inline bool operator<=(const SourceLocation &LHS, const SourceLocation &RHS) {
216 return LHS.getRawEncoding() <= RHS.getRawEncoding();
217}
218inline bool operator>=(const SourceLocation &LHS, const SourceLocation &RHS) {
219 return LHS.getRawEncoding() >= RHS.getRawEncoding();
220}
221
222/// A trivial tuple used to represent a source range.
223///
224/// When referring to tokens, a SourceRange is an inclusive range [begin, end]
225/// that contains its endpoints, its begin SourceLocation points to the first
226/// byte of the first token and its end SourceLocation points to the first byte
227/// of the last token.
231
232public:
233 SourceRange() = default;
234 SourceRange(SourceLocation loc) : B(loc), E(loc) {}
235 SourceRange(SourceLocation begin, SourceLocation end) : B(begin), E(end) {}
236
237 SourceLocation getBegin() const { return B; }
238 SourceLocation getEnd() const { return E; }
239
240 void setBegin(SourceLocation b) { B = b; }
241 void setEnd(SourceLocation e) { E = e; }
242
243 bool isValid() const { return B.isValid() && E.isValid(); }
244 bool isInvalid() const { return !isValid(); }
245
246 bool operator==(const SourceRange &X) const {
247 return B == X.B && E == X.E;
248 }
249
250 bool operator!=(const SourceRange &X) const {
251 return B != X.B || E != X.E;
252 }
253
254 // Returns true iff other is wholly contained within this range.
255 bool fullyContains(const SourceRange &other) const {
256 return B <= other.B && E >= other.E;
257 }
258
259 void print(raw_ostream &OS, const SourceManager &SM) const;
260 std::string printToString(const SourceManager &SM) const;
261 void dump(const SourceManager &SM) const;
262};
263
264/// Represents a byte-granular source range.
265///
266/// The underlying SourceRange can either specify the starting/ending byte
267/// of the range, or it can specify the start of the range and the start of the
268/// last token of the range (a "token range"). In the token range case, the
269/// size of the last token must be measured to determine the actual end of the
270/// range.
271///
272/// CharSourceRange is interpreted differently depending on whether it is a
273/// TokenRange or a CharRange.
274/// For a TokenRange, the range contains the endpoint, i.e. the token containing
275/// the end SourceLocation.
276/// For a CharRange, the range doesn't contain the endpoint, i.e. it ends at the
277/// byte before the end SourceLocation. This allows representing a point
278/// CharRange [begin, begin) that points at the empty range right in front of
279/// the begin SourceLocation.
281 SourceRange Range;
282 bool IsTokenRange = false;
283
284public:
285 CharSourceRange() = default;
286 CharSourceRange(SourceRange R, bool ITR) : Range(R), IsTokenRange(ITR) {}
287
289 return CharSourceRange(R, true);
290 }
291
293 return CharSourceRange(R, false);
294 }
295
299
303
304 /// Return true if the end of this range specifies the start of
305 /// the last token. Return false if the end of this range specifies the first
306 /// byte after the range.
307 bool isTokenRange() const { return IsTokenRange; }
308 bool isCharRange() const { return !IsTokenRange; }
309
310 SourceLocation getBegin() const { return Range.getBegin(); }
311 SourceLocation getEnd() const { return Range.getEnd(); }
312 SourceRange getAsRange() const { return Range; }
313
314 void setBegin(SourceLocation b) { Range.setBegin(b); }
315 void setEnd(SourceLocation e) { Range.setEnd(e); }
316 void setTokenRange(bool TR) { IsTokenRange = TR; }
317
318 bool isValid() const { return Range.isValid(); }
319 bool isInvalid() const { return !isValid(); }
320};
321
322/// Represents an unpacked "presumed" location which can be presented
323/// to the user.
324///
325/// A 'presumed' location can be modified by \#line and GNU line marker
326/// directives and is always the expansion point of a normal location.
327///
328/// You can get a PresumedLoc from a SourceLocation with SourceManager.
330 const char *Filename = nullptr;
331 FileID ID;
332 unsigned Line, Col;
333 SourceLocation IncludeLoc;
334
335public:
336 PresumedLoc() = default;
337 PresumedLoc(const char *FN, FileID FID, unsigned Ln, unsigned Co,
339 : Filename(FN), ID(FID), Line(Ln), Col(Co), IncludeLoc(IL) {}
340
341 /// Return true if this object is invalid or uninitialized.
342 ///
343 /// This occurs when created with invalid source locations or when walking
344 /// off the top of a \#include stack.
345 bool isInvalid() const { return Filename == nullptr; }
346 bool isValid() const { return Filename != nullptr; }
347
348 /// Return the presumed filename of this location.
349 ///
350 /// This can be affected by \#line etc.
351 const char *getFilename() const {
352 assert(isValid());
353 return Filename;
354 }
355
357 assert(isValid());
358 return ID;
359 }
360
361 /// Return the presumed line number of this location.
362 ///
363 /// This can be affected by \#line etc.
364 unsigned getLine() const {
365 assert(isValid());
366 return Line;
367 }
368
369 /// Return the presumed column number of this location.
370 ///
371 /// This cannot be affected by \#line, but is packaged here for convenience.
372 unsigned getColumn() const {
373 assert(isValid());
374 return Col;
375 }
376
377 /// Return the presumed include location of this location.
378 ///
379 /// This can be affected by GNU linemarker directives.
381 assert(isValid());
382 return IncludeLoc;
383 }
384};
385
386/// A SourceLocation and its associated SourceManager.
387///
388/// This is useful for argument passing to functions that expect both objects.
389///
390/// This class does not guarantee the presence of either the SourceManager or
391/// a valid SourceLocation. Clients should use `isValid()` and `hasManager()`
392/// before calling the member functions.
394 const SourceManager *SrcMgr = nullptr;
395
396public:
397 /// Creates a FullSourceLoc where isValid() returns \c false.
398 FullSourceLoc() = default;
399
401 : SourceLocation(Loc), SrcMgr(&SM) {}
402
403 /// Checks whether the SourceManager is present.
404 bool hasManager() const { return SrcMgr != nullptr; }
405
406 /// \pre hasManager()
407 const SourceManager &getManager() const {
408 assert(SrcMgr && "SourceManager is NULL.");
409 return *SrcMgr;
410 }
411
412 FileID getFileID() const;
413
417 PresumedLoc getPresumedLoc(bool UseLineDirectives = true) const;
418 bool isMacroArgExpansion(FullSourceLoc *StartLoc = nullptr) const;
420 std::pair<FullSourceLoc, StringRef> getModuleImportLoc() const;
421 unsigned getFileOffset() const;
422
423 unsigned getExpansionLineNumber(bool *Invalid = nullptr) const;
424 unsigned getExpansionColumnNumber(bool *Invalid = nullptr) const;
425
426 /// Decompose the underlying \c SourceLocation into a raw (FileID + Offset)
427 /// pair, after walking through all expansion records.
428 ///
429 /// \see SourceManager::getDecomposedExpansionLoc
431
432 unsigned getSpellingLineNumber(bool *Invalid = nullptr) const;
433 unsigned getSpellingColumnNumber(bool *Invalid = nullptr) const;
434
435 const char *getCharacterData(bool *Invalid = nullptr) const;
436
437 unsigned getLineNumber(bool *Invalid = nullptr) const;
438 unsigned getColumnNumber(bool *Invalid = nullptr) const;
439
440 const FileEntry *getFileEntry() const;
442
443 /// Return a StringRef to the source buffer data for the
444 /// specified FileID.
445 StringRef getBufferData(bool *Invalid = nullptr) const;
446
447 /// Decompose the specified location into a raw FileID + Offset pair.
448 ///
449 /// The first element is the FileID, the second is the offset from the
450 /// start of the buffer of the location.
452
453 bool isInSystemHeader() const;
454
455 /// Determines the order of 2 source locations in the translation unit.
456 ///
457 /// \returns true if this source location comes before 'Loc', false otherwise.
459
460 /// Determines the order of 2 source locations in the translation unit.
461 ///
462 /// \returns true if this source location comes before 'Loc', false otherwise.
464 assert(Loc.isValid());
465 assert(SrcMgr == Loc.SrcMgr && "Loc comes from another SourceManager!");
467 }
468
469 /// Comparison function class, useful for sorting FullSourceLocs.
471 bool operator()(const FullSourceLoc& lhs, const FullSourceLoc& rhs) const {
472 return lhs.isBeforeInTranslationUnitThan(rhs);
473 }
474 };
475
476 /// Prints information about this FullSourceLoc to stderr.
477 ///
478 /// This is useful for debugging.
479 void dump() const;
480
481 friend bool
482 operator==(const FullSourceLoc &LHS, const FullSourceLoc &RHS) {
483 return LHS.getRawEncoding() == RHS.getRawEncoding() &&
484 LHS.SrcMgr == RHS.SrcMgr;
485 }
486
487 friend bool
488 operator!=(const FullSourceLoc &LHS, const FullSourceLoc &RHS) {
489 return !(LHS == RHS);
490 }
491};
492
493} // namespace clang
494
495namespace llvm {
496
497 /// Define DenseMapInfo so that FileID's can be used as keys in DenseMap and
498 /// DenseSets.
499 template <>
500 struct DenseMapInfo<clang::FileID, void> {
501 static unsigned getHashValue(clang::FileID S) {
502 return S.getHashValue();
503 }
504
505 static bool isEqual(clang::FileID LHS, clang::FileID RHS) {
506 return LHS == RHS;
507 }
508 };
509
510 /// Define DenseMapInfo so that SourceLocation's can be used as keys in
511 /// DenseMap and DenseSet. This trait class is eqivalent to
512 /// DenseMapInfo<unsigned> which uses SourceLocation::ID is used as a key.
513 template <> struct DenseMapInfo<clang::SourceLocation, void> {
514 static unsigned getHashValue(clang::SourceLocation Loc) {
515 return Loc.getHashValue();
516 }
517
519 return LHS == RHS;
520 }
521 };
522
523 // Allow calling FoldingSetNodeID::Add with SourceLocation object as parameter
524 template <> struct FoldingSetTrait<clang::SourceLocation, void> {
525 static void Profile(const clang::SourceLocation &X, FoldingSetNodeID &ID);
526 };
527
528 template <> struct DenseMapInfo<clang::SourceRange> {
529 static unsigned getHashValue(clang::SourceRange Range) {
530 return detail::combineHashValue(Range.getBegin().getHashValue(),
531 Range.getEnd().getHashValue());
532 }
533
535 return LHS == RHS;
536 }
537 };
538
539} // namespace llvm
540
541#endif // LLVM_CLANG_BASIC_SOURCELOCATION_H
#define V(N, I)
Defines interfaces for clang::FileEntry and clang::FileEntryRef.
#define X(type, name)
Definition Value.h:97
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
void setEnd(SourceLocation e)
bool isTokenRange() const
Return true if the end of this range specifies the start of the last token.
static CharSourceRange getCharRange(SourceLocation B, SourceLocation E)
static CharSourceRange getCharRange(SourceRange R)
void setBegin(SourceLocation b)
static CharSourceRange getTokenRange(SourceRange R)
static CharSourceRange getTokenRange(SourceLocation B, SourceLocation E)
SourceLocation getEnd() const
SourceLocation getBegin() const
void setTokenRange(bool TR)
CharSourceRange(SourceRange R, bool ITR)
SourceRange getAsRange() const
Cached information about one file (either on disk or in the virtual file system).
Definition FileEntry.h:273
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
friend class ASTWriter
bool operator<(const FileID &RHS) const
unsigned getHashValue() const
bool operator>(const FileID &RHS) const
bool isValid() const
friend class ASTReader
bool operator==(const FileID &RHS) const
bool isInvalid() const
bool operator>=(const FileID &RHS) const
friend class SourceManager
int getOpaqueValue() const
Returns the raw integer representation of this FileID.
bool operator!=(const FileID &RHS) const
bool operator<=(const FileID &RHS) const
friend class SourceManagerTestHelper
static FileID getSentinel()
A SourceLocation and its associated SourceManager.
FullSourceLoc getFileLoc() const
unsigned getColumnNumber(bool *Invalid=nullptr) const
FileIDAndOffset getDecomposedExpansionLoc() const
Decompose the underlying SourceLocation into a raw (FileID + Offset) pair, after walking through all ...
FullSourceLoc(SourceLocation Loc, const SourceManager &SM)
bool isBeforeInTranslationUnitThan(FullSourceLoc Loc) const
Determines the order of 2 source locations in the translation unit.
FullSourceLoc getExpansionLoc() const
unsigned getLineNumber(bool *Invalid=nullptr) const
FullSourceLoc getSpellingLoc() const
std::pair< FullSourceLoc, StringRef > getModuleImportLoc() const
OptionalFileEntryRef getFileEntryRef() const
unsigned getSpellingLineNumber(bool *Invalid=nullptr) const
FullSourceLoc getImmediateMacroCallerLoc() const
friend bool operator!=(const FullSourceLoc &LHS, const FullSourceLoc &RHS)
const char * getCharacterData(bool *Invalid=nullptr) const
unsigned getExpansionColumnNumber(bool *Invalid=nullptr) const
StringRef getBufferData(bool *Invalid=nullptr) const
Return a StringRef to the source buffer data for the specified FileID.
void dump() const
Prints information about this FullSourceLoc to stderr.
friend bool operator==(const FullSourceLoc &LHS, const FullSourceLoc &RHS)
bool isInSystemHeader() const
const FileEntry * getFileEntry() const
unsigned getFileOffset() const
FullSourceLoc()=default
Creates a FullSourceLoc where isValid() returns false.
PresumedLoc getPresumedLoc(bool UseLineDirectives=true) const
bool hasManager() const
Checks whether the SourceManager is present.
FileIDAndOffset getDecomposedLoc() const
Decompose the specified location into a raw FileID + Offset pair.
bool isMacroArgExpansion(FullSourceLoc *StartLoc=nullptr) const
const SourceManager & getManager() const
unsigned getExpansionLineNumber(bool *Invalid=nullptr) const
bool isBeforeInTranslationUnitThan(SourceLocation Loc) const
Determines the order of 2 source locations in the translation unit.
unsigned getSpellingColumnNumber(bool *Invalid=nullptr) const
Represents an unpacked "presumed" location which can be presented to the user.
unsigned getColumn() const
Return the presumed column number of this location.
PresumedLoc(const char *FN, FileID FID, unsigned Ln, unsigned Co, SourceLocation IL)
const char * getFilename() const
Return the presumed filename of this location.
unsigned getLine() const
Return the presumed line number of this location.
bool isInvalid() const
Return true if this object is invalid or uninitialized.
FileID getFileID() const
PresumedLoc()=default
SourceLocation getIncludeLoc() const
Return the presumed include location of this location.
Encodes a location in the source.
void * getPtrEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) pointer encoding for it.
static SourceLocation getFromRawEncoding(UIntTy Encoding)
Turn a raw encoding of a SourceLocation object into a real SourceLocation.
friend class SourceLocationEncoding
std::string printToString(const SourceManager &SM) const
void dump(const SourceManager &SM) const
static bool isPairOfFileLocations(SourceLocation Start, SourceLocation End)
bool isValid() const
Return true if this is a valid SourceLocation object.
void print(raw_ostream &OS, const SourceManager &SM) const
SourceLocation getLocWithOffset(IntTy Offset) const
Return a source location with the specified offset from this SourceLocation.
UIntTy getRawEncoding() const
When a SourceLocation itself cannot be used, this returns an (opaque) 32-bit integer encoding for it.
unsigned getHashValue() const
static SourceLocation getFromPtrEncoding(const void *Encoding)
Turn a pointer encoding of a SourceLocation object back into a real SourceLocation.
This class handles loading and caching of source files into memory.
A trivial tuple used to represent a source range.
SourceRange(SourceLocation loc)
bool operator==(const SourceRange &X) const
void setBegin(SourceLocation b)
bool isInvalid() const
bool fullyContains(const SourceRange &other) const
SourceLocation getEnd() const
SourceLocation getBegin() const
std::string printToString(const SourceManager &SM) const
bool operator!=(const SourceRange &X) const
void dump(const SourceManager &SM) const
SourceRange()=default
void setEnd(SourceLocation e)
SourceRange(SourceLocation begin, SourceLocation end)
void print(raw_ostream &OS, const SourceManager &SM) const
Top level wrappers for InstallAPI frontend operations.
CustomizableOptional< FileEntryRef > OptionalFileEntryRef
Definition FileEntry.h:196
std::pair< FileID, unsigned > FileIDAndOffset
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
Definition CallGraph.h:218
bool operator<(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
bool operator!=(CanQual< T > x, CanQual< U > y)
bool operator<=(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
bool operator>(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
bool operator>=(DeclarationName LHS, DeclarationName RHS)
Ordering on two declaration names.
Diagnostic wrappers for TextAPI types for error reporting.
Definition Dominators.h:30
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
__builtin_elementwise_add_sat __builtin_elementwise_sub_sat uint32_t __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 __packed_splat2 __packed_splat4 __packed_splat2 __packed_splat8 __packed_splat4 uint32_t
Comparison function class, useful for sorting FullSourceLocs.
bool operator()(const FullSourceLoc &lhs, const FullSourceLoc &rhs) const
static unsigned getHashValue(clang::FileID S)
static bool isEqual(clang::FileID LHS, clang::FileID RHS)
static bool isEqual(clang::SourceLocation LHS, clang::SourceLocation RHS)
static unsigned getHashValue(clang::SourceLocation Loc)
static bool isEqual(clang::SourceRange LHS, clang::SourceRange RHS)
static unsigned getHashValue(clang::SourceRange Range)
static void Profile(const clang::SourceLocation &X, FoldingSetNodeID &ID)