summaryrefslogtreecommitdiffstats
path: root/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-16 07:00:02 +0000
committerChris Lattner <sabre@nondot.org>2009-01-16 07:00:02 +0000
commitdf7c17a8d02fe09a3466786bae3e40fc3252687a (patch)
tree95d529de847149d8b289646aab44be886d019c6f /lib/Basic/SourceLocation.cpp
parent860f6d4af5f37a151d5e5ea3538dc4708cab5d68 (diff)
Change some terminology in SourceLocation: instead of referring to
the "physical" location of tokens, refer to the "spelling" location. This is more concrete and useful, tokens aren't really physical objects! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceLocation.cpp')
-rw-r--r--lib/Basic/SourceLocation.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp
index 5236bfaffb..bb8cac2f9f 100644
--- a/lib/Basic/SourceLocation.cpp
+++ b/lib/Basic/SourceLocation.cpp
@@ -42,9 +42,9 @@ FullSourceLoc FullSourceLoc::getLogicalLoc() const {
return FullSourceLoc(SrcMgr->getLogicalLoc(Loc), *SrcMgr);
}
-FullSourceLoc FullSourceLoc::getPhysicalLoc() const {
- assert (isValid());
- return FullSourceLoc(SrcMgr->getPhysicalLoc(Loc), *SrcMgr);
+FullSourceLoc FullSourceLoc::getSpellingLoc() const {
+ assert(isValid());
+ return FullSourceLoc(SrcMgr->getSpellingLoc(Loc), *SrcMgr);
}
FullSourceLoc FullSourceLoc::getIncludeLoc() const {
@@ -73,14 +73,14 @@ unsigned FullSourceLoc::getLogicalColumnNumber() const {
return SrcMgr->getLogicalColumnNumber(Loc);
}
-unsigned FullSourceLoc::getPhysicalLineNumber() const {
+unsigned FullSourceLoc::getSpellingLineNumber() const {
assert (isValid());
- return SrcMgr->getPhysicalLineNumber(Loc);
+ return SrcMgr->getSpellingLineNumber(Loc);
}
-unsigned FullSourceLoc::getPhysicalColumnNumber() const {
+unsigned FullSourceLoc::getSpellingColumnNumber() const {
assert (isValid());
- return SrcMgr->getPhysicalColumnNumber(Loc);
+ return SrcMgr->getSpellingColumnNumber(Loc);
}
const char* FullSourceLoc::getSourceName() const {
@@ -120,13 +120,13 @@ void FullSourceLoc::dump() const {
}
if (isFileID()) {
- // The logical and physical pos is identical for file locs.
+ // The logical and spelling pos is identical for file locs.
fprintf(stderr, "File Loc from '%s': %d: %d\n",
getSourceName(), getLogicalLineNumber(),
getLogicalColumnNumber());
} else {
- fprintf(stderr, "Macro Loc (\n Physical: ");
- getPhysicalLoc().dump();
+ fprintf(stderr, "Macro Loc (\n Spelling: ");
+ getSpellingLoc().dump();
fprintf(stderr, " Logical: ");
getLogicalLoc().dump();
fprintf(stderr, ")\n");