summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-10 23:10:45 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-10 23:10:45 +0000
commit92863e475e177d919ad1d1d6edf697a5173d4e09 (patch)
tree4718686a281d433f8d7eafd7cd2c7c660c391376 /clang/lib/Frontend/PCHWriter.cpp
parentd352fd36997724a87d498dbc2b30edde5ac8fdbe (diff)
downloadbcm5719-llvm-92863e475e177d919ad1d1d6edf697a5173d4e09.tar.gz
bcm5719-llvm-92863e475e177d919ad1d1d6edf697a5173d4e09.zip
Compare the predefines buffer in the PCH file with the predefines
buffer generated for the current translation unit. If they are different, complain and then ignore the PCH file. This effectively checks for all compilation options that somehow would affect preprocessor state (-D, -U, -include, the dreaded -imacros, etc.). When we do accept the PCH file, throw away the contents of the predefines buffer rather than parsing them, since all of the results of that parsing are already stored in the PCH file. This eliminates the ugliness with the redefinition of __builtin_va_list, among other things. llvm-svn: 68838
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 09080d640b5..4963ea11608 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/lib/Frontend/PCHWriter.cpp
@@ -872,7 +872,7 @@ void PCHWriter::AddTypeRef(QualType T, RecordData &Record) {
}
if (const BuiltinType *BT = dyn_cast<BuiltinType>(T.getTypePtr())) {
- pch::TypeID ID;
+ pch::TypeID ID = 0;
switch (BT->getKind()) {
case BuiltinType::Void: ID = pch::PREDEF_TYPE_VOID_ID; break;
case BuiltinType::Bool: ID = pch::PREDEF_TYPE_BOOL_ID; break;
OpenPOWER on IntegriCloud