[cfe-commits] r158063 - in /cfe/trunk: CMakeLists.txt lib/Analysis/CFG.cpp lib/Driver/CMakeLists.txt lib/Frontend/CMakeLists.txt tools/libclang/CMakeLists.txt

Francois Pichet pichet2000 at gmail.com
Wed Jun 6 05:00:10 PDT 2012


Author: fpichet
Date: Wed Jun  6 07:00:10 2012
New Revision: 158063

URL: http://llvm.org/viewvc/llvm-project?rev=158063&view=rev
Log:
Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.

Only 1 minor code change was necessary: can't use cdecl as variable name anymore.

Modified:
    cfe/trunk/CMakeLists.txt
    cfe/trunk/lib/Analysis/CFG.cpp
    cfe/trunk/lib/Driver/CMakeLists.txt
    cfe/trunk/lib/Frontend/CMakeLists.txt
    cfe/trunk/tools/libclang/CMakeLists.txt

Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=158063&r1=158062&r2=158063&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Wed Jun  6 07:00:10 2012
@@ -198,14 +198,6 @@
   link_system_libs( ${name} )
 
   add_dependencies(${name} ClangDiagnosticCommon)
-  if(MSVC)
-    get_target_property(cflag ${name} COMPILE_FLAGS)
-    if(NOT cflag)
-      set(cflag "")
-    endif(NOT cflag)
-    set(cflag "${cflag} /Za")
-    set_target_properties(${name} PROPERTIES COMPILE_FLAGS ${cflag})
-  endif(MSVC)
   install(TARGETS ${name}
     LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
     ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}

Modified: cfe/trunk/lib/Analysis/CFG.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFG.cpp?rev=158063&r1=158062&r2=158063&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFG.cpp (original)
+++ cfe/trunk/lib/Analysis/CFG.cpp Wed Jun  6 07:00:10 2012
@@ -3200,8 +3200,8 @@
 }
 
 bool CFGImplicitDtor::isNoReturn(ASTContext &astContext) const {
-  if (const CXXDestructorDecl *cdecl = getDestructorDecl(astContext)) {
-    QualType ty = cdecl->getType();
+  if (const CXXDestructorDecl *decl = getDestructorDecl(astContext)) {
+    QualType ty = decl->getType();
     return cast<FunctionType>(ty)->getNoReturnAttr();
   }
   return false;

Modified: cfe/trunk/lib/Driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CMakeLists.txt?rev=158063&r1=158062&r2=158063&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/CMakeLists.txt (original)
+++ cfe/trunk/lib/Driver/CMakeLists.txt Wed Jun  6 07:00:10 2012
@@ -20,13 +20,6 @@
   Types.cpp
   )
 
-IF(MSVC)
-  get_target_property(NON_ANSI_COMPILE_FLAGS clangDriver COMPILE_FLAGS)
-  string(REPLACE /Za
-    "" NON_ANSI_COMPILE_FLAGS
-    ${NON_ANSI_COMPILE_FLAGS})
-  set_target_properties(clangDriver PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
-ENDIF(MSVC)
 
 add_dependencies(clangDriver ClangAttrList ClangDiagnosticDriver
                  ClangDriverOptions ClangCC1AsOptions)

Modified: cfe/trunk/lib/Frontend/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CMakeLists.txt?rev=158063&r1=158062&r2=158063&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CMakeLists.txt (original)
+++ cfe/trunk/lib/Frontend/CMakeLists.txt Wed Jun  6 07:00:10 2012
@@ -41,13 +41,6 @@
   Warnings.cpp
   )
 
-IF(MSVC)
-  get_target_property(NON_ANSI_COMPILE_FLAGS clangFrontend COMPILE_FLAGS)
-  string(REPLACE /Za
-    "" NON_ANSI_COMPILE_FLAGS
-    ${NON_ANSI_COMPILE_FLAGS})
-  set_target_properties(clangFrontend PROPERTIES COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
-ENDIF(MSVC)
 
 add_dependencies(clangFrontend
   ClangAttrClasses

Modified: cfe/trunk/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CMakeLists.txt?rev=158063&r1=158062&r2=158063&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CMakeLists.txt (original)
+++ cfe/trunk/tools/libclang/CMakeLists.txt Wed Jun  6 07:00:10 2012
@@ -76,13 +76,6 @@
       INSTALL_NAME_DIR "@executable_path/../lib")
   endif()
 
-  if(MSVC)
-    # windows.h doesn't compile with /Za
-    get_target_property(NON_ANSI_COMPILE_FLAGS libclang COMPILE_FLAGS)
-    string(REPLACE "/Za" "" NON_ANSI_COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
-    set_target_properties(libclang PROPERTIES
-      COMPILE_FLAGS ${NON_ANSI_COMPILE_FLAGS})
-  endif()
 
   set(LIBCLANG_STATIC_TARGET_NAME libclang_static)
 else()





More information about the cfe-commits mailing list