aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Basic')
-rw-r--r--lib/Basic/SourceLocation.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index fd90b5a2ce..dc1dceb724 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/lib/Basic/SourceLocation.cpp
@@ -142,3 +142,7 @@ std::pair<const char*, const char*> FullSourceLoc::getBufferData() const {
const llvm::MemoryBuffer *Buf = getBuffer();
return std::make_pair(Buf->getBufferStart(), Buf->getBufferEnd());
}
+
+std::pair<FileID, unsigned> FullSourceLoc::getDecomposedLoc() const {
+ return SrcMgr->getDecomposedLoc(*this);
+}