[cfe-commits] r59860 - in /cfe/trunk: include/clang/Lex/Preprocessor.h lib/Lex/Preprocessor.cpp

Chris Lattner sabre at nondot.org
Fri Nov 21 22:42:32 PST 2008


Author: lattner
Date: Sat Nov 22 00:42:31 2008
New Revision: 59860

URL: http://llvm.org/viewvc/llvm-project?rev=59860&view=rev
Log:
inline a method into its only two call sites.

Modified:
    cfe/trunk/include/clang/Lex/Preprocessor.h
    cfe/trunk/lib/Lex/Preprocessor.cpp

Modified: cfe/trunk/include/clang/Lex/Preprocessor.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/Preprocessor.h?rev=59860&r1=59859&r2=59860&view=diff

==============================================================================
--- cfe/trunk/include/clang/Lex/Preprocessor.h (original)
+++ cfe/trunk/include/clang/Lex/Preprocessor.h Sat Nov 22 00:42:31 2008
@@ -189,10 +189,6 @@
   IdentifierTable &getIdentifierTable() { return Identifiers; }
   SelectorTable &getSelectorTable() { return Selectors; }
 
-  inline FullSourceLoc getFullLoc(SourceLocation Loc) const {
-    return FullSourceLoc(Loc, getSourceManager());
-  }
-  
   /// SetCommentRetentionState - Control whether or not the preprocessor retains
   /// comments in output.
   void SetCommentRetentionState(bool KeepComments, bool KeepMacroComments) {

Modified: cfe/trunk/lib/Lex/Preprocessor.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Preprocessor.cpp?rev=59860&r1=59859&r2=59860&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/Preprocessor.cpp (original)
+++ cfe/trunk/lib/Lex/Preprocessor.cpp Sat Nov 22 00:42:31 2008
@@ -118,11 +118,12 @@
 /// the specified Token's location, translating the token's start
 /// position in the current buffer into a SourcePosition object for rendering.
 DiagnosticBuilder Preprocessor::Diag(SourceLocation Loc, unsigned DiagID) {
-  return Diags.Report(getFullLoc(Loc), DiagID);
+  return Diags.Report(FullSourceLoc(Loc, getSourceManager()), DiagID);
 }
 
 DiagnosticBuilder Preprocessor::Diag(const Token &Tok, unsigned DiagID) {
-  return Diags.Report(getFullLoc(Tok.getLocation()), DiagID);
+  return Diags.Report(FullSourceLoc(Tok.getLocation(), getSourceManager()),
+                      DiagID);
 }
 
 void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const {





More information about the cfe-commits mailing list