[cfe-commits] r63667 - in /cfe/trunk: include/clang/Basic/SourceManager.h lib/Basic/SourceManager.cpp lib/Lex/PPDirectives.cpp

Chris Lattner sabre at nondot.org
Tue Feb 3 13:52:56 PST 2009


Author: lattner
Date: Tue Feb  3 15:52:55 2009
New Revision: 63667

URL: http://llvm.org/viewvc/llvm-project?rev=63667&view=rev
Log:
stub out basic #line handling calls.

Modified:
    cfe/trunk/include/clang/Basic/SourceManager.h
    cfe/trunk/lib/Basic/SourceManager.cpp
    cfe/trunk/lib/Lex/PPDirectives.cpp

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=63667&r1=63666&r2=63667&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Tue Feb  3 15:52:55 2009
@@ -536,6 +536,10 @@
   /// 
   unsigned getLineTableFilenameID(const char *Ptr, unsigned Len);
   
+  /// AddLineNote - Add a line note to the line table for the FileID and offset
+  /// specified by Loc.  If FilenameID is -1, it is considered to be
+  /// unspecified.
+  void AddLineNote(SourceLocation Loc, unsigned LineNo, int FilenameID);
   
   //===--------------------------------------------------------------------===//
   // Other miscellaneous methods.

Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=63667&r1=63666&r2=63667&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Tue Feb  3 15:52:55 2009
@@ -114,6 +114,15 @@
 }
 
 
+/// AddLineNote - Add a line note to the line table for the FileID and offset
+/// specified by Loc.  If FilenameID is -1, it is considered to be
+/// unspecified.
+void SourceManager::AddLineNote(SourceLocation Loc, unsigned LineNo,
+                                int FilenameID) {
+  
+}
+
+
 //===--------------------------------------------------------------------===//
 // Private 'Create' methods.
 //===--------------------------------------------------------------------===//

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

==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Tue Feb  3 15:52:55 2009
@@ -651,7 +651,7 @@
     CheckEndOfDirective("#line");
   }
   
-  // FIXME: do something with the #line info.
+  SourceMgr.AddLineNote(DigitTok.getLocation(), LineNo, FilenameID);
 }
 
 /// ReadLineMarkerFlags - Parse and validate any flags at the end of a GNU line
@@ -762,10 +762,8 @@
       return;
   }
   
-  // FIXME: do something with the #line info.
-  
-  
-  
+  // FIXME: do something with the #line flag info.
+  SourceMgr.AddLineNote(DigitTok.getLocation(), LineNo, FilenameID);
 }
 
 





More information about the cfe-commits mailing list