diff options
author | Chris Lattner <sabre@nondot.org> | 2009-02-03 21:52:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-02-03 21:52:55 +0000 |
commit | 1eaa70a612aa748c214858bef25e3fb79dbcb5c8 (patch) | |
tree | f51eed6298617405f8075cc8f51ba68aa76a4d87 | |
parent | e80f317886a1bed87acd0d6c663f5786fad88593 (diff) | |
download | bcm5719-llvm-1eaa70a612aa748c214858bef25e3fb79dbcb5c8.tar.gz bcm5719-llvm-1eaa70a612aa748c214858bef25e3fb79dbcb5c8.zip |
stub out basic #line handling calls.
llvm-svn: 63667
-rw-r--r-- | clang/include/clang/Basic/SourceManager.h | 4 | ||||
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 9 | ||||
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 8 |
3 files changed, 16 insertions, 5 deletions
diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h index ce2aeccb904..a875f93c33a 100644 --- a/clang/include/clang/Basic/SourceManager.h +++ b/clang/include/clang/Basic/SourceManager.h @@ -536,6 +536,10 @@ public: /// 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. diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 6f78ee175c6..ce9efb034a9 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -114,6 +114,15 @@ unsigned SourceManager::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 SourceManager::AddLineNote(SourceLocation Loc, unsigned LineNo, + int FilenameID) { + +} + + //===--------------------------------------------------------------------===// // Private 'Create' methods. //===--------------------------------------------------------------------===// diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 1ff469b8258..fa57ab3c81b 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -651,7 +651,7 @@ void Preprocessor::HandleLineDirective(Token &Tok) { 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 @@ void Preprocessor::HandleDigitDirective(Token &DigitTok) { return; } - // FIXME: do something with the #line info. - - - + // FIXME: do something with the #line flag info. + SourceMgr.AddLineNote(DigitTok.getLocation(), LineNo, FilenameID); } |