aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Lex/HeaderSearch.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-02-24 03:55:14 +0000
committerTed Kremenek <kremenek@apple.com>2008-02-24 03:55:14 +0000
commitca63fa00786e51c207c829f4182f11a6c6b552be (patch)
tree34e3a6ebeaa746676b09a865d373be8fda627f37 /include/clang/Lex/HeaderSearch.h
parent6bb816a3b895e9c983d89b22d510dca58a0eb75e (diff)
Two more Windows-related fixes:
- More enum signeness bitfield fixes (MSVC treats enums as signed). - Fixed in Lex/HeaderSearch.cpp an unsafe copy between two HeaderSearch::PerFileInfo entries in a common vector. The copy involved two calls to getFileInfo() within the assignment; these calls could have side-effects that enlarged the internal vector, and with MSVC this would invalidate one of the values in the assignment. Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex/HeaderSearch.h')
-rw-r--r--include/clang/Lex/HeaderSearch.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h
index a7f8a116fb..3c43213be6 100644
--- a/include/clang/Lex/HeaderSearch.h
+++ b/include/clang/Lex/HeaderSearch.h
@@ -45,10 +45,11 @@ class HeaderSearch {
/// isImport - True if this is a #import'd or #pragma once file.
bool isImport : 1;
+ // NOTE: VC++ treats enums as signed, avoid using DirectoryLookup::DirType
/// DirInfo - Keep track of whether this is a system header, and if so,
/// whether it is C++ clean or not. This can be set by the include paths or
/// by #pragma gcc system_header.
- DirectoryLookup::DirType DirInfo : 2;
+ unsigned DirInfo : 2;
/// NumIncludes - This is the number of times the file has been included
/// already.
@@ -155,7 +156,7 @@ public:
/// getFileDirFlavor - Return whether the specified file is a normal header,
/// a system header, or a C++ friendly system header.
DirectoryLookup::DirType getFileDirFlavor(const FileEntry *File) {
- return getFileInfo(File).DirInfo;
+ return DirectoryLookup::DirType(getFileInfo(File).DirInfo);
}
/// MarkFileIncludeOnce - Mark the specified file as a "once only" file, e.g.