]> granicus.if.org Git - clang/commitdiff
Fix build on windows.
authorCedric Venet <cedric.venet@laposte.net>
Sat, 21 Feb 2009 17:14:49 +0000 (17:14 +0000)
committerCedric Venet <cedric.venet@laposte.net>
Sat, 21 Feb 2009 17:14:49 +0000 (17:14 +0000)
Should clang have a config.h or should we use the config.h of llvm or using the preprocessor is OK?  I did a quick fix here, but having a guideline on how to handle non portable function would be great (or ask ted to stop breaking the windows build :)).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65233 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/ASTContext.cpp
lib/Analysis/CFRefCount.cpp

index e24de5331467a8772c2be427b692fe938fbc3a24..4a84e3d66ca8891bec1ef16242a6d42229cca2d2 100644 (file)
@@ -2816,7 +2816,7 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS) {
     if (areCompatVectorTypes(LHS->getAsVectorType(), RHS->getAsVectorType()))
       return LHS;
     return QualType();
-  case Type::ObjCInterface:
+  case Type::ObjCInterface: {
     // Check if the interfaces are assignment compatible.
     const ObjCInterfaceType* LHSIface = LHS->getAsObjCInterfaceType();
     const ObjCInterfaceType* RHSIface = RHS->getAsObjCInterfaceType();
@@ -2825,6 +2825,7 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS) {
       return LHS;
 
     return QualType();
+  }
   case Type::ObjCQualifiedId:
     // Distinct qualified id's are not compatible.
     return QualType();
index 4d4bd059d7b330d235181d17e3b42a9cb1f41966..a602de2dbc2f8ed586d44535999d7f4990ad0833 100644 (file)
 
 using namespace clang;
 
+#ifdef _MSC_VER
+#  define strncasecmp _strnicmp
+#endif // #ifdef _MSC_VER
+
 //===----------------------------------------------------------------------===//
 // Utility functions.
 //===----------------------------------------------------------------------===//