Skip to content

Commit

Permalink
Rename variable to indicate what it is being used for
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98816 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
krajaratnam committed Mar 18, 2010
1 parent 10f2873 commit 8f0d270
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Frontend/CacheTokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) {
// Pad 0's so that we emit tokens to a 4-byte alignment.
// This speed up reading them back in.
Pad(Out, 4);
Offset off = (Offset) Out.tell();
Offset TokenOff = (Offset) Out.tell();

// Keep track of matching '#if' ... '#endif'.
typedef std::vector<std::pair<Offset, unsigned> > PPCondTable;
Expand Down Expand Up @@ -418,15 +418,15 @@ PTHEntry PTHWriter::LexTokens(Lexer& L) {
Emit32(PPCond.size());

for (unsigned i = 0, e = PPCond.size(); i!=e; ++i) {
Emit32(PPCond[i].first - off);
Emit32(PPCond[i].first - TokenOff);
uint32_t x = PPCond[i].second;
assert(x != 0 && "PPCond entry not backpatched.");
// Emit zero for #endifs. This allows us to do checking when
// we read the PTH file back in.
Emit32(x == i ? 0 : x);
}

return PTHEntry(off, PPCondOff);
return PTHEntry(TokenOff, PPCondOff);
}

Offset PTHWriter::EmitCachedSpellings() {
Expand All @@ -452,7 +452,7 @@ void PTHWriter::GeneratePTH(const std::string &MainFile) {

// Write the name of the MainFile.
if (!MainFile.empty()) {
EmitString(MainFile);
EmitString(MainFile);
} else {
// String with 0 bytes.
Emit16(0);
Expand Down

0 comments on commit 8f0d270

Please sign in to comment.