[cfe-commits] r62501 - /cfe/trunk/lib/Lex/PPDirectives.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 18 23:59:15 PST 2009
Author: lattner
Date: Mon Jan 19 01:59:15 2009
New Revision: 62501
URL: http://llvm.org/viewvc/llvm-project?rev=62501&view=rev
Log:
do not use SourceManager::getFileCharacteristic(FileID), it is not
safe because a #line can change the file characteristic on a per-loc
basis.
Modified:
cfe/trunk/lib/Lex/PPDirectives.cpp
Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=62501&r1=62500&r2=62501&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Mon Jan 19 01:59:15 2009
@@ -783,7 +783,7 @@
// 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(),
More information about the cfe-commits
mailing list