From 3963a48221351c61c17fb3f382341ab04809a3d3 Mon Sep 17 00:00:00 2001 From: dim Date: Thu, 20 Oct 2011 21:14:49 +0000 Subject: Vendor import of clang release_30 branch r142614: http://llvm.org/svn/llvm-project/cfe/branches/release_30@142614 --- lib/Basic/SourceLocation.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/Basic/SourceLocation.cpp') diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp index 5062d43..6e4f3e6 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 << ""; return; @@ -48,13 +48,13 @@ void SourceLocation::print(llvm::raw_ostream &OS, const SourceManager &SM)const{ OS << ""; 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 << " 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(); } -- cgit v1.1