aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceLocation.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-01-28 20:46:26 +0000
committerTed Kremenek <kremenek@apple.com>2009-01-28 20:46:26 +0000
commit3632a35e811096da86d957c3e6ba0e73d75782f5 (patch)
tree964eb6bc193f5c5a30e923e7e964daf5f76c5335 /include/clang/Basic/SourceLocation.h
parent509355e982d15da4f8f3939493516379665f6275 (diff)
Add method FullSourceLoc::getBufferData().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r--include/clang/Basic/SourceLocation.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index 31fbc0218b..4a6ae1f29d 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -16,6 +16,7 @@
#include <cassert>
#include "llvm/Bitcode/SerializationFwd.h"
+#include <utility>
namespace llvm {
class MemoryBuffer;
@@ -178,7 +179,7 @@ public:
class FullSourceLoc : public SourceLocation {
SourceManager* SrcMgr;
public:
- // Creates a FullSourceLoc where isValid() returns false.
+ /// Creates a FullSourceLoc where isValid() returns false.
explicit FullSourceLoc() : SrcMgr((SourceManager*) 0) {}
explicit FullSourceLoc(SourceLocation Loc, SourceManager &SM)
@@ -212,6 +213,10 @@ public:
const llvm::MemoryBuffer* getBuffer() const;
+ /// getBufferData - Return a pointer to the start and end of the source buffer
+ /// data for the specified FileID.
+ std::pair<const char*, const char*> getBufferData() const;
+
bool isInSystemHeader() const;
/// Prints information about this FullSourceLoc to stderr. Useful for