summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-04-29 00:18:15 +0000
committerDouglas Gregor <dgregor@apple.com>2010-04-29 00:18:15 +0000
commitd17020676106cd77cd35d263c5549b605dad0225 (patch)
tree0c226b716d4557190e486e71f490f08cbad50d14 /clang/lib/Frontend/PCHReaderStmt.cpp
parenta5a8f76cea106a8d766bd6d9351fd0f51ef46a2f (diff)
downloadbcm5719-llvm-d17020676106cd77cd35d263c5549b605dad0225.tar.gz
bcm5719-llvm-d17020676106cd77cd35d263c5549b605dad0225.zip
Teach __builtin_offsetof to compute the offsets of members of base
classes, since we only warn (not error) on offsetof() for non-POD types. We store the base path within the OffsetOfExpr itself, then evaluate the offsets within the constant evaluator. llvm-svn: 102571
Diffstat (limited to 'clang/lib/Frontend/PCHReaderStmt.cpp')
-rw-r--r--clang/lib/Frontend/PCHReaderStmt.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHReaderStmt.cpp b/clang/lib/Frontend/PCHReaderStmt.cpp
index 8588c8aa1a2..ef6b77026d7 100644
--- a/clang/lib/Frontend/PCHReaderStmt.cpp
+++ b/clang/lib/Frontend/PCHReaderStmt.cpp
@@ -462,6 +462,11 @@ unsigned PCHStmtReader::VisitOffsetOfExpr(OffsetOfExpr *E) {
case Node::Identifier:
E->setComponent(I, Node(Start, Reader.GetIdentifier(Record[Idx++]), End));
break;
+
+ case Node::Base:
+ // FIXME: Implement this!
+ llvm_unreachable("PCH for offsetof(base-specifier) not implemented");
+ break;
}
}
OpenPOWER on IntegriCloud