diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-10-20 21:14:49 +0000 |
commit | 36981b17ed939300f6f8fc2355a255f711fcef71 (patch) | |
tree | ee2483e98b09cac943dc93a6969d83ca737ff139 /lib/Basic/SourceLocation.cpp | |
parent | 180abc3db9ae3b4fc63cd65b15697e6ffcc8a657 (diff) |
Notes
Diffstat (limited to 'lib/Basic/SourceLocation.cpp')
-rw-r--r-- | lib/Basic/SourceLocation.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp index 5062d43f58f25..6e4f3e6ad7a42 100644 --- a/lib/Basic/SourceLocation.cpp +++ b/lib/Basic/SourceLocation.cpp @@ -23,7 +23,7 @@ using namespace clang; // PrettyStackTraceLoc //===----------------------------------------------------------------------===// -void PrettyStackTraceLoc::print(llvm::raw_ostream &OS) const { +void PrettyStackTraceLoc::print(raw_ostream &OS) const { if (Loc.isValid()) { Loc.print(OS, SM); OS << ": "; @@ -35,7 +35,7 @@ void PrettyStackTraceLoc::print(llvm::raw_ostream &OS) const { // SourceLocation //===----------------------------------------------------------------------===// -void SourceLocation::print(llvm::raw_ostream &OS, const SourceManager &SM)const{ +void SourceLocation::print(raw_ostream &OS, const SourceManager &SM)const{ if (!isValid()) { OS << "<invalid loc>"; return; @@ -48,13 +48,13 @@ void SourceLocation::print(llvm::raw_ostream &OS, const SourceManager &SM)const{ OS << "<invalid>"; return; } - // The instantiation and spelling pos is identical for file locs. + // The macro expansion and spelling pos is identical for file locs. OS << PLoc.getFilename() << ':' << PLoc.getLine() << ':' << PLoc.getColumn(); return; } - SM.getInstantiationLoc(*this).print(OS, SM); + SM.getExpansionLoc(*this).print(OS, SM); OS << " <Spelling="; SM.getSpellingLoc(*this).print(OS, SM); @@ -75,9 +75,9 @@ FileID FullSourceLoc::getFileID() const { } -FullSourceLoc FullSourceLoc::getInstantiationLoc() const { +FullSourceLoc FullSourceLoc::getExpansionLoc() const { assert(isValid()); - return FullSourceLoc(SrcMgr->getInstantiationLoc(*this), *SrcMgr); + return FullSourceLoc(SrcMgr->getExpansionLoc(*this), *SrcMgr); } FullSourceLoc FullSourceLoc::getSpellingLoc() const { @@ -85,14 +85,14 @@ FullSourceLoc FullSourceLoc::getSpellingLoc() const { return FullSourceLoc(SrcMgr->getSpellingLoc(*this), *SrcMgr); } -unsigned FullSourceLoc::getInstantiationLineNumber(bool *Invalid) const { +unsigned FullSourceLoc::getExpansionLineNumber(bool *Invalid) const { assert(isValid()); - return SrcMgr->getInstantiationLineNumber(*this, Invalid); + return SrcMgr->getExpansionLineNumber(*this, Invalid); } -unsigned FullSourceLoc::getInstantiationColumnNumber(bool *Invalid) const { +unsigned FullSourceLoc::getExpansionColumnNumber(bool *Invalid) const { assert(isValid()); - return SrcMgr->getInstantiationColumnNumber(*this, Invalid); + return SrcMgr->getExpansionColumnNumber(*this, Invalid); } unsigned FullSourceLoc::getSpellingLineNumber(bool *Invalid) const { @@ -125,7 +125,7 @@ const llvm::MemoryBuffer* FullSourceLoc::getBuffer(bool *Invalid) const { return SrcMgr->getBuffer(SrcMgr->getFileID(*this), Invalid); } -llvm::StringRef FullSourceLoc::getBufferData(bool *Invalid) const { +StringRef FullSourceLoc::getBufferData(bool *Invalid) const { return getBuffer(Invalid)->getBuffer(); } |