summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-06-27 18:08:49 +0000
committerChris Lattner <sabre@nondot.org>2007-06-27 18:08:49 +0000
commitc8c3dadaa02c21f3f80567d175b4f2ba913c4a85 (patch)
tree77f2a56ee4e69d43d068ec9ad8548ff85bd12504 /clang/CodeGen
parentc2d8163bcd9e0d9854ee9e94a56ddad762852121 (diff)
downloadbcm5719-llvm-c8c3dadaa02c21f3f80567d175b4f2ba913c4a85.tar.gz
bcm5719-llvm-c8c3dadaa02c21f3f80567d175b4f2ba913c4a85.zip
fix codegen of void-returning functions
llvm-svn: 39693
Diffstat (limited to 'clang/CodeGen')
-rw-r--r--clang/CodeGen/CodeGenTypes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/CodeGen/CodeGenTypes.cpp b/clang/CodeGen/CodeGenTypes.cpp
index 58664643039..d97f1e03d78 100644
--- a/clang/CodeGen/CodeGenTypes.cpp
+++ b/clang/CodeGen/CodeGenTypes.cpp
@@ -110,7 +110,7 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) {
std::vector<const llvm::Type*> ArgTys;
// Struct return passes the struct byref.
- if (!ResultType->isFirstClassType()) {
+ if (!ResultType->isFirstClassType() && ResultType != llvm::Type::VoidTy) {
ArgTys.push_back(llvm::PointerType::get(ResultType));
ResultType = llvm::Type::VoidTy;
}
OpenPOWER on IntegriCloud