aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-10-21 23:30:10 +0000
committerEric Christopher <echristo@apple.com>2011-10-21 23:30:10 +0000
commit06253664315307d34ab57b892b6a0c6c5b3153bb (patch)
tree751b54da911ab9852a946e7b0e37d50a79d8db0c /lib/CodeGen/CodeGenFunction.cpp
parent33b3d2a5b6bcdd23cbb1c8b828dd43c1aa4b5825 (diff)
Fix PR11073 by adding the argument type information to the decl we construct
for the function type. Update a testcase accordingly. Patch initially by Anders Waldenborg! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142700 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 8191f021da..7036682eb5 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -298,12 +298,19 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
// Emit subprogram debug descriptor.
if (CGDebugInfo *DI = getDebugInfo()) {
- // FIXME: what is going on here and why does it ignore all these
- // interesting type properties?
+ unsigned NumArgs = 0;
+ QualType *ArgsArray = new QualType[Args.size()];
+ for (FunctionArgList::const_iterator i = Args.begin(), e = Args.end();
+ i != e; ++i) {
+ ArgsArray[NumArgs++] = (*i)->getType();
+ }
+
QualType FnType =
- getContext().getFunctionType(RetTy, 0, 0,
+ getContext().getFunctionType(RetTy, ArgsArray, NumArgs,
FunctionProtoType::ExtProtoInfo());
+ delete ArgsArray;
+
DI->setLocation(StartLoc);
DI->EmitFunctionStart(GD, FnType, CurFn, Builder);
}