summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-06-03 17:05:26 +0000
committerDevang Patel <dpatel@apple.com>2011-06-03 17:05:26 +0000
commit597a730cb8efe039dd2dd76999e038b3b80a98ef (patch)
treec2971bb37bc41eb4e7beeafe7dfd40f67f4b8cdc /clang/lib/CodeGen
parent1d40024322d9e3eb903a9bded4d0c1c87f6cc026 (diff)
downloadbcm5719-llvm-597a730cb8efe039dd2dd76999e038b3b80a98ef.tar.gz
bcm5719-llvm-597a730cb8efe039dd2dd76999e038b3b80a98ef.zip
Fix typedef's context.
llvm-svn: 132557
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index cc0dbd6bb5e..7f81d30c677 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -555,8 +555,9 @@ llvm::DIType CGDebugInfo::CreateType(const TypedefType *Ty,
// We don't set size information, but do specify where the typedef was
// declared.
unsigned Line = getLineNumber(Ty->getDecl()->getLocation());
- llvm::DIType DbgTy = DBuilder.createTypedef(Src, Ty->getDecl()->getName(),
- Unit, Line);
+ llvm::DIType DbgTy =
+ DBuilder.createTypedef(Src, Ty->getDecl()->getName(), Unit, Line,
+ getContextDescriptor(cast<Decl>(Ty->getDecl()->getDeclContext())));
return DbgTy;
}
OpenPOWER on IntegriCloud