aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteMacros.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-27 06:27:13 +0000
committerChris Lattner <sabre@nondot.org>2009-01-27 06:27:13 +0000
commit52c29081281955d3db9e11d10573b2d38f709099 (patch)
tree28948e3c2b20fb85ca2870abe1f5ba32d2524820 /Driver/RewriteMacros.cpp
parent5f0e9325adee74323514469ccc9a78f4facd66b0 (diff)
rename getFullFilePos -> getFileOffset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteMacros.cpp')
-rw-r--r--Driver/RewriteMacros.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Driver/RewriteMacros.cpp b/Driver/RewriteMacros.cpp
index 6ad4a7160c..809a3b510b 100644
--- a/Driver/RewriteMacros.cpp
+++ b/Driver/RewriteMacros.cpp
@@ -130,13 +130,13 @@ void clang::RewriteMacrosInInput(Preprocessor &PP,const std::string &InFileName,
const IdentifierInfo *II = RawTokens[CurRawTok].getIdentifierInfo();
if (!strcmp(II->getName(), "warning")) {
// Comment out #warning.
- RB.InsertTextAfter(SM.getFullFilePos(RawTok.getLocation()), "//", 2);
+ RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//", 2);
} else if (!strcmp(II->getName(), "pragma") &&
RawTokens[CurRawTok+1].is(tok::identifier) &&
!strcmp(RawTokens[CurRawTok+1].getIdentifierInfo()->getName(),
"mark")){
// Comment out #pragma mark.
- RB.InsertTextAfter(SM.getFullFilePos(RawTok.getLocation()), "//", 2);
+ RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//", 2);
}
}
@@ -150,8 +150,8 @@ void clang::RewriteMacrosInInput(Preprocessor &PP,const std::string &InFileName,
// Okay, both tokens are from the same file. Get their offsets from the
// start of the file.
- unsigned PPOffs = SM.getFullFilePos(PPLoc);
- unsigned RawOffs = SM.getFullFilePos(RawTok.getLocation());
+ unsigned PPOffs = SM.getFileOffset(PPLoc);
+ unsigned RawOffs = SM.getFileOffset(RawTok.getLocation());
// If the offsets are the same and the token kind is the same, ignore them.
if (PPOffs == RawOffs && isSameToken(RawTok, PPTok)) {
@@ -173,7 +173,7 @@ void clang::RewriteMacrosInInput(Preprocessor &PP,const std::string &InFileName,
EndPos = RawOffs+RawTok.getLength();
RawTok = GetNextRawTok(RawTokens, CurRawTok, true);
- RawOffs = SM.getFullFilePos(RawTok.getLocation());
+ RawOffs = SM.getFileOffset(RawTok.getLocation());
if (RawTok.is(tok::comment)) {
// Skip past the comment.
@@ -197,7 +197,7 @@ void clang::RewriteMacrosInInput(Preprocessor &PP,const std::string &InFileName,
Expansion += ' ' + PP.getSpelling(PPTok);
PP.Lex(PPTok);
PPLoc = SM.getInstantiationLoc(PPTok.getLocation());
- PPOffs = SM.getFullFilePos(PPLoc);
+ PPOffs = SM.getFileOffset(PPLoc);
}
Expansion += ' ';
RB.InsertTextBefore(InsertPos, &Expansion[0], Expansion.size());