aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-07-04 13:58:54 +0000
committerEd Schouten <ed@FreeBSD.org>2009-07-04 13:58:54 +0000
commit5362a71c02e7d448a8ce98cf00c47e353fba5d04 (patch)
tree8ddfe382e1c6d590dc240e76f7cd45cea5c78e24 /lib/CodeGen/CodeGenTypes.cpp
parent4ebdf5c4f587daef4e0be499802eac3a7a49bf2f (diff)
downloadsrc-5362a71c02e7d448a8ce98cf00c47e353fba5d04.tar.gz
src-5362a71c02e7d448a8ce98cf00c47e353fba5d04.zip
Import Clang r74788.vendor/clang/clang-r74788
Notes
Notes: svn path=/vendor/clang/dist/; revision=195341 svn path=/vendor/clang/clang-r74788/; revision=195343; tag=vendor/clang/clang-r74788
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.cpp')
-rw-r--r--lib/CodeGen/CodeGenTypes.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenTypes.cpp b/lib/CodeGen/CodeGenTypes.cpp
index f31c610bf97d..1a30ea37fbbc 100644
--- a/lib/CodeGen/CodeGenTypes.cpp
+++ b/lib/CodeGen/CodeGenTypes.cpp
@@ -449,7 +449,7 @@ const llvm::Type *CodeGenTypes::ConvertTagDeclType(const TagDecl *TD) {
const RecordDecl *RD = cast<const RecordDecl>(TD);
// There isn't any extra information for empty structures/unions.
- if (RD->field_empty(getContext())) {
+ if (RD->field_empty()) {
ResultType = llvm::StructType::get(std::vector<const llvm::Type*>());
} else {
// Layout fields.
@@ -532,8 +532,8 @@ void RecordOrganizer::layoutStructFields(const ASTRecordLayout &RL) {
std::vector<const llvm::Type*> LLVMFields;
unsigned curField = 0;
- for (RecordDecl::field_iterator Field = RD.field_begin(CGT.getContext()),
- FieldEnd = RD.field_end(CGT.getContext());
+ for (RecordDecl::field_iterator Field = RD.field_begin(),
+ FieldEnd = RD.field_end();
Field != FieldEnd; ++Field) {
uint64_t offset = RL.getFieldOffset(curField);
const llvm::Type *Ty = CGT.ConvertTypeForMemRecursive(Field->getType());
@@ -578,8 +578,8 @@ void RecordOrganizer::layoutStructFields(const ASTRecordLayout &RL) {
/// all fields are added.
void RecordOrganizer::layoutUnionFields(const ASTRecordLayout &RL) {
unsigned curField = 0;
- for (RecordDecl::field_iterator Field = RD.field_begin(CGT.getContext()),
- FieldEnd = RD.field_end(CGT.getContext());
+ for (RecordDecl::field_iterator Field = RD.field_begin(),
+ FieldEnd = RD.field_end();
Field != FieldEnd; ++Field) {
// The offset should usually be zero, but bitfields could be strange
uint64_t offset = RL.getFieldOffset(curField);