[cfe-commits] r65233 - in /cfe/trunk/lib: AST/ASTContext.cpp Analysis/CFRefCount.cpp

Cedric Venet cedric.venet at laposte.net
Sat Feb 21 09:14:49 PST 2009


Author: venet
Date: Sat Feb 21 11:14:49 2009
New Revision: 65233

URL: http://llvm.org/viewvc/llvm-project?rev=65233&view=rev
Log:
Fix build on windows.

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 :)).

Modified:
    cfe/trunk/lib/AST/ASTContext.cpp
    cfe/trunk/lib/Analysis/CFRefCount.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=65233&r1=65232&r2=65233&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Sat Feb 21 11:14:49 2009
@@ -2816,7 +2816,7 @@
     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 @@
       return LHS;
 
     return QualType();
+  }
   case Type::ObjCQualifiedId:
     // Distinct qualified id's are not compatible.
     return QualType();

Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=65233&r1=65232&r2=65233&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Sat Feb 21 11:14:49 2009
@@ -35,6 +35,10 @@
 
 using namespace clang;
 
+#ifdef _MSC_VER
+#  define strncasecmp _strnicmp
+#endif // #ifdef _MSC_VER
+
 //===----------------------------------------------------------------------===//
 // Utility functions.
 //===----------------------------------------------------------------------===//





More information about the cfe-commits mailing list