From: Nico Weber Date: Tue, 15 May 2018 16:30:30 +0000 (+0000) Subject: Rename three cxx files in unittests to cpp. X-Git-Tag: llvmorg-7.0.0-rc1~5983 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8a953299237b84c666f71b59ef769563273565bb;p=platform%2Fupstream%2Fllvm.git Rename three cxx files in unittests to cpp. LLVM uses cpp as its C++ file extension, these are the only three cxx file in the monorepo. These files apparently were called to escape a CMake check -- use the LLVM_OPTIONAL_SOURCES mechanism that's meant as an escape for this case instead. No intended behavior change. https://reviews.llvm.org/D46843 llvm-svn: 332368 --- diff --git a/llvm/unittests/Passes/CMakeLists.txt b/llvm/unittests/Passes/CMakeLists.txt index 46fb197..c29f098 100644 --- a/llvm/unittests/Passes/CMakeLists.txt +++ b/llvm/unittests/Passes/CMakeLists.txt @@ -1,3 +1,6 @@ +# Needed by LLVM's CMake checks because this file defines multiple targets. +set(LLVM_OPTIONAL_SOURCES TestPlugin.cpp) + set(LLVM_LINK_COMPONENTS Support Passes Core) # If plugins are disabled, this test will disable itself at runtime. Otherwise, @@ -9,7 +12,7 @@ endif() add_llvm_unittest(PluginsTests PluginsTest.cpp) export_executable_symbols(PluginsTests) -add_library(TestPlugin MODULE TestPlugin.cxx) +add_library(TestPlugin MODULE TestPlugin.cpp) set_output_directory(TestPlugin BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR} diff --git a/llvm/unittests/Passes/TestPlugin.cxx b/llvm/unittests/Passes/TestPlugin.cpp similarity index 94% rename from llvm/unittests/Passes/TestPlugin.cxx rename to llvm/unittests/Passes/TestPlugin.cpp index adb666e..2ba6f9b 100644 --- a/llvm/unittests/Passes/TestPlugin.cxx +++ b/llvm/unittests/Passes/TestPlugin.cpp @@ -1,4 +1,4 @@ -//===- unittests/Passes/Plugins/Plugin.cxx --------------------------------===// +//===- unittests/Passes/Plugins/Plugin.cpp --------------------------------===// // // The LLVM Compiler Infrastructure // diff --git a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt index 4f060e4..7960326 100644 --- a/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt +++ b/llvm/unittests/Support/DynamicLibrary/CMakeLists.txt @@ -1,6 +1,9 @@ +# Needed by LLVM's CMake checks because this file defines multiple targets. +set(LLVM_OPTIONAL_SOURCES ExportedFuncs.cpp PipSqueak.cpp) + set(LLVM_LINK_COMPONENTS Support) -add_library(DynamicLibraryLib STATIC ExportedFuncs.cxx) +add_library(DynamicLibraryLib STATIC ExportedFuncs.cpp) set_target_properties(DynamicLibraryLib PROPERTIES FOLDER "Tests") add_llvm_unittest(DynamicLibraryTests DynamicLibraryTest.cpp) @@ -8,7 +11,7 @@ target_link_libraries(DynamicLibraryTests PRIVATE DynamicLibraryLib) export_executable_symbols(DynamicLibraryTests) function(dynlib_add_module NAME) - add_library(${NAME} SHARED PipSqueak.cxx) + add_library(${NAME} SHARED PipSqueak.cpp) set_target_properties(${NAME} PROPERTIES FOLDER "Tests") set_output_directory(${NAME} diff --git a/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx b/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cpp similarity index 84% rename from llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx rename to llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cpp index 97f190b..370c8cb 100644 --- a/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cxx +++ b/llvm/unittests/Support/DynamicLibrary/ExportedFuncs.cpp @@ -1,4 +1,4 @@ -//===- llvm/unittest/Support/DynamicLibrary/DynamicLibraryLib.cpp ---------===// +//===- llvm/unittest/Support/DynamicLibrary/ExportedFuncs.cpp -------------===// // // The LLVM Compiler Infrastructure // diff --git a/llvm/unittests/Support/DynamicLibrary/PipSqueak.cxx b/llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp similarity index 92% rename from llvm/unittests/Support/DynamicLibrary/PipSqueak.cxx rename to llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp index 375d72c..e2f1cf7 100644 --- a/llvm/unittests/Support/DynamicLibrary/PipSqueak.cxx +++ b/llvm/unittests/Support/DynamicLibrary/PipSqueak.cpp @@ -1,4 +1,4 @@ -//===- llvm/unittest/Support/DynamicLibrary/PipSqueak.cxx -----------------===// +//===- llvm/unittest/Support/DynamicLibrary/PipSqueak.cpp -----------------===// // // The LLVM Compiler Infrastructure // @@ -46,4 +46,4 @@ extern "C" PIPSQUEAK_EXPORT void TestOrder(std::vector &V) { } #define PIPSQUEAK_TESTA_RETURN "LibCall" -#include "ExportedFuncs.cxx" +#include "ExportedFuncs.cpp"