From 486754660bb926339aefcf012a3f848592babb8b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 28 Jul 2018 11:06:01 +0000 Subject: Vendor import of clang trunk r338150: https://llvm.org/svn/llvm-project/cfe/trunk@338150 --- lib/Basic/SourceLocation.cpp | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) (limited to 'lib/Basic/SourceLocation.cpp') diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp index 89ddbc946a490..fef1f44fc8a50 100644 --- a/lib/Basic/SourceLocation.cpp +++ b/lib/Basic/SourceLocation.cpp @@ -1,4 +1,4 @@ -//==--- SourceLocation.cpp - Compact identifier for Source Files -*- C++ -*-==// +//===- SourceLocation.cpp - Compact identifier for Source Files -----------===// // // The LLVM Compiler Infrastructure // @@ -12,10 +12,17 @@ //===----------------------------------------------------------------------===// #include "clang/Basic/SourceLocation.h" +#include "clang/Basic/LLVM.h" #include "clang/Basic/PrettyStackTrace.h" #include "clang/Basic/SourceManager.h" +#include "llvm/ADT/StringRef.h" +#include "llvm/Support/Compiler.h" +#include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/raw_ostream.h" -#include +#include +#include +#include + using namespace clang; //===----------------------------------------------------------------------===// @@ -81,7 +88,6 @@ FileID FullSourceLoc::getFileID() const { return SrcMgr->getFileID(*this); } - FullSourceLoc FullSourceLoc::getExpansionLoc() const { assert(isValid()); return FullSourceLoc(SrcMgr->getExpansionLoc(*this), *SrcMgr); @@ -97,15 +103,6 @@ FullSourceLoc FullSourceLoc::getFileLoc() const { return FullSourceLoc(SrcMgr->getFileLoc(*this), *SrcMgr); } -std::pair -FullSourceLoc::getImmediateExpansionRange() const { - assert(isValid()); - std::pair Range = - SrcMgr->getImmediateExpansionRange(*this); - return std::make_pair(FullSourceLoc(Range.first, *SrcMgr), - FullSourceLoc(Range.second, *SrcMgr)); -} - PresumedLoc FullSourceLoc::getPresumedLoc(bool UseLineDirectives) const { if (!isValid()) return PresumedLoc(); @@ -148,15 +145,6 @@ unsigned FullSourceLoc::getColumnNumber(bool *Invalid) const { return SrcMgr->getColumnNumber(getFileID(), getFileOffset(), Invalid); } -std::pair -FullSourceLoc::getExpansionRange() const { - assert(isValid()); - std::pair Range = - SrcMgr->getExpansionRange(*this); - return std::make_pair(FullSourceLoc(Range.first, *SrcMgr), - FullSourceLoc(Range.second, *SrcMgr)); -} - const FileEntry *FullSourceLoc::getFileEntry() const { assert(isValid()); return SrcMgr->getFileEntryForID(getFileID()); -- cgit v1.2.3