diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-02-05 09:24:53 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-02-05 09:24:53 +0000 |
commit | cea3af4e5403f12e9e8b66360ca23bce66f322e0 (patch) | |
tree | af5fadf6bb74b56411527f915e304a096c4ae07b /clang/lib/CodeGen/CGCall.cpp | |
parent | 747865af0c3fe31e8e7fd179056ba9db9d4fdcc7 (diff) | |
download | bcm5719-llvm-cea3af4e5403f12e9e8b66360ca23bce66f322e0.tar.gz bcm5719-llvm-cea3af4e5403f12e9e8b66360ca23bce66f322e0.zip |
Simplify test for whether we need an alloca to hold an indirect return
value.
- No functionality change.
llvm-svn: 63859
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 703bcd0d852..af3ea74d23e 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -1337,19 +1337,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, // location that we would like to return into. QualType RetTy = CallInfo.getReturnType(); const ABIArgInfo &RetAI = CallInfo.getReturnInfo(); - switch (RetAI.getKind()) { - case ABIArgInfo::Indirect: + if (CGM.ReturnTypeUsesSret(CallInfo)) { // Create a temporary alloca to hold the result of the call. :( Args.push_back(CreateTempAlloca(ConvertType(RetTy))); - break; - - case ABIArgInfo::Direct: - case ABIArgInfo::Ignore: - case ABIArgInfo::Coerce: - break; - - case ABIArgInfo::Expand: - assert(0 && "Invalid ABI kind for return argument"); } assert(CallInfo.arg_size() == CallArgs.size() && |