llvm.org GIT mirror llvm / 0e8c40d
Disable -Wcomment when building with GCC. GCC version of -Wcomment is not compatible with ascii art graph diagrams. Reverts r207629. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208073 91177308-0d34-0410-b5e6-96231b3b80d8 Evgeniy Stepanov 6 years ago
2 changed file(s) with 22 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
294294 append_if(USE_NO_MAYBE_UNINITIALIZED "-Wno-maybe-uninitialized" CMAKE_CXX_FLAGS)
295295 check_cxx_compiler_flag("-Werror -Wnon-virtual-dtor" CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG)
296296 append_if(CXX_SUPPORTS_NON_VIRTUAL_DTOR_FLAG "-Wnon-virtual-dtor" CMAKE_CXX_FLAGS)
297
298 # Check if -Wcomment is OK with an // comment ending with '\' if the next
299 # line is also a // comment.
300 set(OLD_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
301 set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -Werror -Wcomment)
302 CHECK_C_SOURCE_COMPILES("// \\\\\\n//\\nint main() {return 0;}"
303 C_WCOMMENT_ALLOWS_LINE_WRAP)
304 set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
305 if (NOT C_WCOMMENT_ALLOWS_LINE_WRAP)
306 append("-Wno-comment" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
307 endif()
297308 endif (LLVM_ENABLE_WARNINGS)
298309 append_if(LLVM_ENABLE_WERROR "-Werror" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
299310 if (LLVM_ENABLE_CXX1Y)
4040
4141 // IR forming a call graph with a diamond of triangle-shaped SCCs:
4242 //
43 // d1 |
44 // / \ |
45 // d3--d2 |
46 // / \ |
47 // b1 c1 |
48 // / \ / \ |
49 // b3--b2 c3--c2 |
50 // \ / |
51 // a1 |
52 // / \ |
53 // a3--a2 |
43 // d1
44 // / \
45 // d3--d2
46 // / \
47 // b1 c1
48 // / \ / \
49 // b3--b2 c3--c2
50 // \ /
51 // a1
52 // / \
53 // a3--a2
5454 //
5555 // All call edges go up between SCCs, and clockwise around the SCC.
5656 static const char DiamondOfTriangles[] =