summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ec8b573)
raw | patch | inline | side by side (parent: ec8b573)
author | Rafael Espindola <rafael.espindola@gmail.com> | |
Tue, 9 Sep 2014 14:52:27 +0000 (14:52 +0000) | ||
committer | Rafael Espindola <rafael.espindola@gmail.com> | |
Tue, 9 Sep 2014 14:52:27 +0000 (14:52 +0000) |
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217445 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Linker/LinkModules.cpp | patch | blob | history | |
test/Linker/Inputs/linkage2.ll | patch | blob | history | |
test/Linker/linkage2.ll | patch | blob | history |
index 14c6a10c3398e70ad607254db556ee051a244d4c..6e425992393f5dea5f6963a1276c819b6d5a2da2 100644 (file)
if (DestIsDeclaration) {
LinkFromSrc = true;
LT = Src->getLinkage();
+ } else {
+ LinkFromSrc = false;
+ LT = Dest->getLinkage();
}
} else if (Dest->hasExternalWeakLinkage()) {
// If the Dest is weak, use the source linkage.
index 3f6963ec4c7c3c54821e89ac7a1a8611e3ebf156..6ecaeb55a0fa27f3b6df9c9e89106c3fc2be27b2 100644 (file)
@test1_a = weak global i8 1
+
+@test2_a = external dllimport global i8
index 2ecdc1ff30a75932ea8c54ba7bc2e10f781bf91f..99cb22c05c262901489da0137880fc1961261070 100644 (file)
--- a/test/Linker/linkage2.ll
+++ b/test/Linker/linkage2.ll
; RUN: llvm-link %p/Inputs/linkage2.ll %s -S | FileCheck %s
@test1_a = common global i8 0
-
; CHECK: @test1_a = common global i8 0
+
+@test2_a = global i8 0
+; CHECK: @test2_a = global i8 0