diff options
author | Chris Lattner <sabre@nondot.org> | 2009-01-19 07:59:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-01-19 07:59:15 +0000 |
commit | 693faa6e6918994bc22aacf078a889bb93e0fe25 (patch) | |
tree | aa8d0e2917e43e6bb1d45ea5e7e4b3395cbc4e65 /lib/Lex/PPDirectives.cpp | |
parent | a11d61793341fea195c29a0dab3fbd74f2b39a8c (diff) |
do not use SourceManager::getFileCharacteristic(FileID), it is not
safe because a #line can change the file characteristic on a per-loc
basis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPDirectives.cpp')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index f7551a2532..ef26aeb79a 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -783,7 +783,7 @@ void Preprocessor::HandleIncludeDirective(Token &IncludeTok, // header. SrcMgr::CharacteristicKind FileCharacter = std::max(HeaderInfo.getFileDirFlavor(File), - SourceMgr.getFileCharacteristic(getCurrentFileLexer()->getFileID())); + SourceMgr.getFileCharacteristic(FilenameTok.getLocation())); // Look up the file, create a File ID for it. FileID FID = SourceMgr.createFileID(File, FilenameTok.getLocation(), |