aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR')
-rw-r--r--lib/IR/DIBuilder.cpp9
-rw-r--r--lib/IR/DebugInfo.cpp4
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/IR/DIBuilder.cpp b/lib/IR/DIBuilder.cpp
index e36d028..665e16e 100644
--- a/lib/IR/DIBuilder.cpp
+++ b/lib/IR/DIBuilder.cpp
@@ -844,7 +844,7 @@ DIDescriptor DIBuilder::createUnspecifiedParameter() {
/// createForwardDecl - Create a temporary forward-declared type that
/// can be RAUW'd if the full type is seen.
-DIType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name,
+DICompositeType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name,
DIDescriptor Scope, DIFile F,
unsigned Line, unsigned RuntimeLang,
uint64_t SizeInBits,
@@ -863,11 +863,12 @@ DIType DIBuilder::createForwardDecl(unsigned Tag, StringRef Name,
DIDescriptor::FlagFwdDecl),
NULL,
DIArray(),
- ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang)
+ ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang),
+ NULL
};
MDNode *Node = MDNode::getTemporary(VMContext, Elts);
- DIType RetTy(Node);
- assert(RetTy.isType() &&
+ DICompositeType RetTy(Node);
+ assert(RetTy.isCompositeType() &&
"createForwardDecl result should be a DIType");
return RetTy;
}
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 0f7ddb5..cffc2ac 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -647,7 +647,7 @@ void DICompositeType::setTypeArray(DIArray Elements, DIArray TParams) {
DbgNode = N;
}
-void DICompositeType::addMember(DISubprogram S) {
+void DICompositeType::addMember(DIDescriptor D) {
SmallVector<llvm::Value *, 16> M;
DIArray OrigM = getTypeArray();
unsigned Elements = OrigM.getNumElements();
@@ -656,7 +656,7 @@ void DICompositeType::addMember(DISubprogram S) {
M.reserve(Elements + 1);
for (unsigned i = 0; i != Elements; ++i)
M.push_back(OrigM.getElement(i));
- M.push_back(S);
+ M.push_back(D);
setTypeArray(DIArray(MDNode::get(DbgNode->getContext(), M)));
}