[llvm] r255045 - Revert "Add Available Externally linkage type to isWeakForLinker()"
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 8 11:13:31 PST 2015
Author: mehdi_amini
Date: Tue Dec 8 13:13:31 2015
New Revision: 255045
URL: http://llvm.org/viewvc/llvm-project?rev=255045&view=rev
Log:
Revert "Add Available Externally linkage type to isWeakForLinker()"
This reverts r255043, as per post-review concern were raised on the correctness.
From: Mehdi Amini <mehdi.amini at apple.com>
Removed:
llvm/trunk/test/Transforms/GlobalOpt/available_externally_global_ctors.ll
Modified:
llvm/trunk/include/llvm/IR/GlobalValue.h
Modified: llvm/trunk/include/llvm/IR/GlobalValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/GlobalValue.h?rev=255045&r1=255044&r2=255045&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/GlobalValue.h (original)
+++ llvm/trunk/include/llvm/IR/GlobalValue.h Tue Dec 8 13:13:31 2015
@@ -256,8 +256,7 @@ public:
static bool isWeakForLinker(LinkageTypes Linkage) {
return Linkage == WeakAnyLinkage || Linkage == WeakODRLinkage ||
Linkage == LinkOnceAnyLinkage || Linkage == LinkOnceODRLinkage ||
- Linkage == CommonLinkage || Linkage == ExternalWeakLinkage ||
- Linkage == AvailableExternallyLinkage;
+ Linkage == CommonLinkage || Linkage == ExternalWeakLinkage;
}
bool hasExternalLinkage() const { return isExternalLinkage(Linkage); }
Removed: llvm/trunk/test/Transforms/GlobalOpt/available_externally_global_ctors.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/GlobalOpt/available_externally_global_ctors.ll?rev=255044&view=auto
==============================================================================
--- llvm/trunk/test/Transforms/GlobalOpt/available_externally_global_ctors.ll (original)
+++ llvm/trunk/test/Transforms/GlobalOpt/available_externally_global_ctors.ll (removed)
@@ -1,22 +0,0 @@
-target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-apple-macosx10.11.0"
-
-; RUN: opt -S -globalopt < %s | FileCheck %s
-
-; Verify that the initialization of the available_externally global is not eliminated
-; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @foo_static_init, i8* null }]
-
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @foo_static_init, i8* null }]
- at foo_external = available_externally global void ()* null
-
-define internal void @foo_static_init() {
-entry:
- store void ()* @foo_impl, void ()** @foo_external
- ret void
-}
-
-define internal void @foo_impl() {
-entry:
- ret void
-}
-
More information about the llvm-commits
mailing list