17#include "llvm/ADT/DenseMapInfo.h"
18#include "llvm/ADT/FoldingSet.h"
19#include "llvm/ADT/StringRef.h"
20#include "llvm/Support/Compiler.h"
21#include "llvm/Support/MemoryBuffer.h"
22#include "llvm/Support/raw_ostream.h"
38 OS << Message <<
'\n';
45static_assert(std::is_trivially_destructible_v<SourceLocation>,
46 "SourceLocation must be trivially destructible because it is "
49static_assert(std::is_trivially_destructible_v<SourceRange>,
50 "SourceRange must be trivially destructible because it is "
54 return llvm::DenseMapInfo<UIntTy>::getHashValue(ID);
64 OS <<
"<invalid loc>";
81 SM.getExpansionLoc(*this).print(OS,
SM);
84 SM.getSpellingLoc(*this).print(OS,
SM);
88LLVM_DUMP_METHOD std::string
91 llvm::raw_string_ostream OS(S);
103 llvm::errs() <<
'\n';
113 OS <<
"<invalid sloc>";
147LLVM_DUMP_METHOD std::string
150 llvm::raw_string_ostream OS(S);
204 std::pair<SourceLocation, StringRef> ImportLoc =
206 return std::make_pair(
FullSourceLoc(ImportLoc.first, *SrcMgr),
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the PrettyStackTraceEntry class, which is used to make crashes give more contextual informati...
static PresumedLoc PrintDifference(raw_ostream &OS, const SourceManager &SM, SourceLocation Loc, PresumedLoc Previous)
Defines the clang::SourceLocation class and associated facilities.
Defines the SourceManager interface.
Cached information about one file (either on disk or in the virtual file system).
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
A SourceLocation and its associated SourceManager.
FullSourceLoc getFileLoc() const
unsigned getColumnNumber(bool *Invalid=nullptr) const