summaryrefslogtreecommitdiffstats
path: root/clang/runtime
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-02-24 20:46:36 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-02-24 20:46:36 +0000
commitfb532b9a340958494a5346f2230d51653e8ed31e (patch)
tree8b440293a23d1fb94658086ac9ef8c5266a7e449 /clang/runtime
parent40afcb547e4302017bcb5c06ae2204084c3dc776 (diff)
downloadbcm5719-llvm-fb532b9a340958494a5346f2230d51653e8ed31e.tar.gz
bcm5719-llvm-fb532b9a340958494a5346f2230d51653e8ed31e.zip
Add whole-program vtable optimization feature to Clang.
This patch introduces the -fwhole-program-vtables flag, which enables the whole-program vtable optimization feature (D16795) in Clang. Differential Revision: http://reviews.llvm.org/D16821 llvm-svn: 261767
Diffstat (limited to 'clang/runtime')
-rw-r--r--clang/runtime/CMakeLists.txt10
-rw-r--r--clang/runtime/vtables_blacklist.txt8
2 files changed, 18 insertions, 0 deletions
diff --git a/clang/runtime/CMakeLists.txt b/clang/runtime/CMakeLists.txt
index 4775b0d25da..3215d8f6286 100644
--- a/clang/runtime/CMakeLists.txt
+++ b/clang/runtime/CMakeLists.txt
@@ -134,3 +134,13 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/)
VERBATIM)
endif()
endif()
+
+set(src "${CMAKE_CURRENT_SOURCE_DIR}/vtables_blacklist.txt")
+set(dst "${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/vtables_blacklist.txt")
+add_custom_command(OUTPUT ${dst}
+ DEPENDS ${src}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
+ COMMENT "Copying vtables blacklist")
+add_custom_target(vtables_blacklist DEPENDS ${dst})
+add_dependencies(clang vtables_blacklist)
+install(FILES ${src} DESTINATION lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
diff --git a/clang/runtime/vtables_blacklist.txt b/clang/runtime/vtables_blacklist.txt
new file mode 100644
index 00000000000..f2016428d80
--- /dev/null
+++ b/clang/runtime/vtables_blacklist.txt
@@ -0,0 +1,8 @@
+# Standard library types.
+type:std::*
+
+# The stdext namespace contains Microsoft standard library extensions.
+type:stdext::*
+
+# Types with a uuid attribute, i.e. COM types.
+type:attr:uuid
OpenPOWER on IntegriCloud