summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-05 21:37:29 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-05 21:37:29 +0000
commit61a0a7519ee0d26334d30a001501b8c443d36975 (patch)
tree11daf573cf4ecdeda026b96f7aa8648ae78c1649 /lib/CodeGen/CodeGenModule.h
parent93b97a8737e867d3ea193ca46db0615f9ff73592 (diff)
downloadclang-61a0a7519ee0d26334d30a001501b8c443d36975.tar.gz
clang-61a0a7519ee0d26334d30a001501b8c443d36975.tar.bz2
clang-61a0a7519ee0d26334d30a001501b8c443d36975.tar.xz
Produce direct calls instead of alias to linkonce_odr functions.
This is a small optimization on linux, but should help more on windows where msvc only outputs one destructor if there would be two identical ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194095 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r--lib/CodeGen/CodeGenModule.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 45a9e20a51..02b9ce6471 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -279,6 +279,9 @@ class CodeGenModule : public CodeGenTypeCache {
/// is defined once we get to the end of the of the translation unit.
std::vector<GlobalDecl> Aliases;
+ typedef llvm::StringMap<llvm::TrackingVH<llvm::Constant> > ReplacementsTy;
+ ReplacementsTy Replacements;
+
/// DeferredVTables - A queue of (optional) vtables to consider emitting.
std::vector<const CXXRecordDecl*> DeferredVTables;
@@ -1082,6 +1085,9 @@ private:
/// was deferred.
void EmitDeferred();
+ /// Call replaceAllUsesWith on all pairs in Replacements.
+ void applyReplacements();
+
void checkAliases();
/// EmitDeferredVTables - Emit any vtables which we deferred and