]> granicus.if.org Git - clang/commit
[CUDA][HIP] Do not emit type info when compiling for device
authorYaxun Liu <Yaxun.Liu@amd.com>
Tue, 5 Jun 2018 15:11:02 +0000 (15:11 +0000)
committerYaxun Liu <Yaxun.Liu@amd.com>
Tue, 5 Jun 2018 15:11:02 +0000 (15:11 +0000)
commit571a2502f2d7ee604a60058b81301ee1875d499e
tree8df920e9823cd63c495729044ec66d6568332c20
parent2cf50762e034228e6a72cb37c61e959f04105404
[CUDA][HIP] Do not emit type info when compiling for device

CUDA/HIP does not support RTTI on device side, therefore there
is no point of emitting type info when compiling for device.

Emitting type info for device not only clutters the IR with useless
global variables, but also causes undefined symbol at linking
since vtable for cxxabiv1::class_type_info has external linkage.

Differential Revision: https://reviews.llvm.org/D47694

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334021 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CodeGenModule.cpp
test/CodeGenCUDA/device-vtable.cu