]> granicus.if.org Git - clang/commitdiff
fix some warnings, patch by Justin Handville
authorChris Lattner <sabre@nondot.org>
Sun, 16 Sep 2007 19:23:47 +0000 (19:23 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 16 Sep 2007 19:23:47 +0000 (19:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42010 91177308-0d34-0410-b5e6-96231b3b80d8

AST/ASTContext.cpp
CodeGen/CGExpr.cpp
CodeGen/CodeGenTypes.cpp

index 87f68fed247477b97bb02bb1248f7b3a29d5bf0c..89da7dc867b51d37f378b6cffdd68a6646f30530 100644 (file)
@@ -730,6 +730,9 @@ QualType ASTContext::getFloatingTypeOfSizeWithinDomain(
     }
   }
   assert(0 && "getFloatingTypeOfSizeWithinDomain(): illegal domain");
+  //an invalid return value, but the assert
+  //will ensure that this code is never reached.
+  return VoidTy;
 }
 
 /// compareFloatingType - Handles 3 different combos: 
index 64fa549a05ff65097ef3512933004890d6ca8ca5..d896c95097619d98a61e1ff7d8e875e23f5a54c6 100644 (file)
@@ -134,6 +134,9 @@ RValue CodeGenFunction::EmitLoadOfLValue(LValue LV, QualType ExprType) {
     return EmitLoadOfOCUElementLValue(LV, ExprType);
   
   assert(0 && "Bitfield ref not impl!");
+  //an invalid RValue, but the assert will
+  //ensure that this point is never reached
+  return RValue();
 }
 
 // If this is a reference to a subset of the elements of a vector, either
@@ -270,6 +273,9 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) {
     return LValue::MakeAddr(CGM.GetAddrOfGlobalDecl(D));
   }
   assert(0 && "Unimp declref");
+  //an invalid LValue, but the assert will
+  //ensure that this point is never reached.
+  return LValue();
 }
 
 LValue CodeGenFunction::EmitUnaryOpLValue(const UnaryOperator *E) {
index 46668e45d8eb3adb94da23eed9e8ccaf9a3bcc36..21a359fe70df83e8fc162322d5f73deb51dafc80 100644 (file)
@@ -136,6 +136,11 @@ const llvm::Type *CodeGenTypes::ConvertType(QualType T) {
     
     return llvm::FunctionType::get(ResultType, ArgTys, isVarArg, 0);
   }
+
+  case Type::ObjcInterface:
+    assert(0 && "FIXME: add missing functionality here");
+    break;
+
   case Type::Tagged:
     const TagType &TT = cast<TagType>(Ty);
     const TagDecl *TD = TT.getDecl();