]> granicus.if.org Git - clang/commit
Do not emit thunks with available_externally linkage in comdats
authorDerek Schuff <dschuff@google.com>
Fri, 8 May 2015 16:47:21 +0000 (16:47 +0000)
committerDerek Schuff <dschuff@google.com>
Fri, 8 May 2015 16:47:21 +0000 (16:47 +0000)
commitb3458674c25e62ac911be7e75eaf9f26fae39051
tree6e09d91e69f65f881107ccf38fb1e8c25dd86c0a
parentedde10883191d8940d7a73458e03a517b4c67e9c
Do not emit thunks with available_externally linkage in comdats

Functions with available_externally linkage will not be emitted to object
files (they will just be undefined symbols), so it does not make sense to
put them in comdats.

Creates a second overload of maybeSetTrivialComdat that uses the GlobalObject
instead of the Decl, and uses that in several places that had the faulty
logic.

Differential Revision: http://reviews.llvm.org/D9580

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236879 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CGVTT.cpp
lib/CodeGen/CGVTables.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/CodeGen/ItaniumCXXABI.cpp
test/CodeGenCXX/thunks.cpp