summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/HeaderIncludeGen.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-11 17:29:44 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-11 17:29:44 +0000
commit7a70d2f11bb1db242d004ca950ce858b09b80d0a (patch)
treeae934230c795b1011ce649698b0b8732c8b5ddfd /clang/lib/Frontend/HeaderIncludeGen.cpp
parentad018f10bcfc58e33dc52773b523360441adba2e (diff)
downloadbcm5719-llvm-7a70d2f11bb1db242d004ca950ce858b09b80d0a.tar.gz
bcm5719-llvm-7a70d2f11bb1db242d004ca950ce858b09b80d0a.zip
For the FileChanged Preprocessor callback, when exiting a file, pass its FileID.
llvm-svn: 141681
Diffstat (limited to 'clang/lib/Frontend/HeaderIncludeGen.cpp')
-rw-r--r--clang/lib/Frontend/HeaderIncludeGen.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Frontend/HeaderIncludeGen.cpp b/clang/lib/Frontend/HeaderIncludeGen.cpp
index 283239dde02..3b41d894ec5 100644
--- a/clang/lib/Frontend/HeaderIncludeGen.cpp
+++ b/clang/lib/Frontend/HeaderIncludeGen.cpp
@@ -39,7 +39,8 @@ public:
}
virtual void FileChanged(SourceLocation Loc, FileChangeReason Reason,
- SrcMgr::CharacteristicKind FileType);
+ SrcMgr::CharacteristicKind FileType,
+ FileID PrevFID);
};
}
@@ -72,7 +73,8 @@ void clang::AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders,
void HeaderIncludesCallback::FileChanged(SourceLocation Loc,
FileChangeReason Reason,
- SrcMgr::CharacteristicKind NewFileType) {
+ SrcMgr::CharacteristicKind NewFileType,
+ FileID PrevFID) {
// Unless we are exiting a #include, make sure to skip ahead to the line the
// #include directive was at.
PresumedLoc UserLoc = SM.getPresumedLoc(Loc);
OpenPOWER on IntegriCloud