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 | ce93399f26f23735b8e291321f18ad54f64cb58a (patch) | |
tree | 5a4ecc8846e264dd4f4a7722d5962a7e3fd6d066 /lib/CodeGen/CGCall.cpp | |
parent | b5e2f698accd4d3a1379983304a2f31ec194c332 (diff) |
minor cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index d7a03c9bbf..bfc22d1bc7 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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)); |