summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-10-23 01:52:13 +0000
committerMike Stump <mrs@apple.com>2009-10-23 01:52:13 +0000
commitae2559a221013e276b01712d0bf47b986fa64690 (patch)
treefb11ae5367b3a43c23341764337ff9aa38426cb1 /clang/lib/CodeGen/CodeGenFunction.cpp
parentdbe4424c375d2c7f9623e8f1c2a345ae16afb806 (diff)
downloadbcm5719-llvm-ae2559a221013e276b01712d0bf47b986fa64690.tar.gz
bcm5719-llvm-ae2559a221013e276b01712d0bf47b986fa64690.zip
Fixup the return type of functions.
llvm-svn: 84922
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 5206f447f8d..ba93e5d0ebc 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -167,18 +167,20 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
Builder.SetInsertPoint(EntryBB);
+ QualType FnType = getContext().getFunctionType(RetTy, 0, 0, false, 0);
+
// Emit subprogram debug descriptor.
// FIXME: The cast here is a huge hack.
if (CGDebugInfo *DI = getDebugInfo()) {
DI->setLocation(StartLoc);
if (isa<FunctionDecl>(D)) {
- DI->EmitFunctionStart(CGM.getMangledName(GD), RetTy, CurFn, Builder);
+ DI->EmitFunctionStart(CGM.getMangledName(GD), FnType, CurFn, Builder);
} else {
// Just use LLVM function name.
// FIXME: Remove unnecessary conversion to std::string when API settles.
DI->EmitFunctionStart(std::string(Fn->getName()).c_str(),
- RetTy, CurFn, Builder);
+ FnType, CurFn, Builder);
}
}
OpenPOWER on IntegriCloud