]> granicus.if.org Git - clang/commitdiff
minor cleanups.
authorChris Lattner <sabre@nondot.org>
Tue, 29 Jun 2010 16:40:28 +0000 (16:40 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 29 Jun 2010 16:40:28 +0000 (16:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107150 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp
lib/CodeGen/CodeGenTypes.cpp

index d7a03c9bbfaba964ec74ad22710b8413bcd9a497..bfc22d1bc795f33b022579b44c785753bb00419b 100644 (file)
@@ -13,6 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "CGCall.h"
+#include "ABIInfo.h"
 #include "CodeGenFunction.h"
 #include "CodeGenModule.h"
 #include "clang/Basic/TargetInfo.h"
 #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));
index f04b2ee3e9df5b7d34bc99044b366e440ea08453..cf23c07394c7feeacff8ffcc4b5a1a4754e3e593 100644 (file)
@@ -300,7 +300,7 @@ const llvm::Type *CodeGenTypes::ConvertNewType(QualType T) {
   case Type::FunctionNoProto:
   case Type::FunctionProto: {
     // First, check whether we can build the full function type.
-    if (const TagTypeTT = VerifyFuncTypeComplete(&Ty)) {
+    if (const TagType *TT = VerifyFuncTypeComplete(&Ty)) {
       // This function's type depends on an incomplete tag type; make sure
       // we have an opaque type corresponding to the tag type.
       ConvertTagDeclType(TT->getDecl());