diff options
author | Chris Lattner <sabre@nondot.org> | 2010-06-29 16:40:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-06-29 16:40:28 +0000 |
commit | e70a007b36b36630668612e6b80aad9732e88d5e (patch) | |
tree | 0a55799372f636ee9a3bd9d3c57b3e4b3d695992 /clang/lib/CodeGen/CGCall.cpp | |
parent | 00d3d8e9028e4937121cb8b76254bcac3d6477fc (diff) | |
download | bcm5719-llvm-e70a007b36b36630668612e6b80aad9732e88d5e.tar.gz bcm5719-llvm-e70a007b36b36630668612e6b80aad9732e88d5e.zip |
minor cleanups.
llvm-svn: 107150
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index d7a03c9bbfa..bfc22d1bc79 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "CGCall.h" +#include "ABIInfo.h" #include "CodeGenFunction.h" #include "CodeGenModule.h" #include "clang/Basic/TargetInfo.h" @@ -23,16 +24,11 @@ #include "llvm/Attributes.h" #include "llvm/Support/CallSite.h" #include "llvm/Target/TargetData.h" - -#include "ABIInfo.h" - using namespace clang; using namespace CodeGen; /***/ -// FIXME: Use iterator and sidestep silly type array creation. - static unsigned ClangCallConvToLLVMCallConv(CallingConv CC) { switch (CC) { default: return llvm::CallingConv::C; @@ -80,8 +76,7 @@ static const CGFunctionInfo &getFunctionInfo(CodeGenTypes &CGT, for (unsigned i = 0, e = FTP->getNumArgs(); i != e; ++i) ArgTys.push_back(FTP->getArgType(i)); CanQualType ResTy = FTP->getResultType().getUnqualifiedType(); - return CGT.getFunctionInfo(ResTy, ArgTys, - FTP->getExtInfo()); + return CGT.getFunctionInfo(ResTy, ArgTys, FTP->getExtInfo()); } const CGFunctionInfo & @@ -1222,9 +1217,8 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, Args.data(), Args.data()+Args.size()); EmitBlock(Cont); } - if (callOrInvoke) { + if (callOrInvoke) *callOrInvoke = CS.getInstruction(); - } CS.setAttributes(Attrs); CS.setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv)); |