From 1c63fe6c61b2e1d6050f971f26946cda1e708a9c Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 17 Jun 2015 18:31:02 +0000 Subject: [PATCH] LowerBitSets: Do not assign names to aliases of unnamed bitset element objects. The restriction on unnamed aliases was removed in r239921. Mostly reverts r239590, but we keep the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239923 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/LowerBitSets.cpp | 5 ++--- test/Transforms/LowerBitSets/unnamed.ll | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Transforms/IPO/LowerBitSets.cpp b/lib/Transforms/IPO/LowerBitSets.cpp index dec583b0e2d..bffeebb6e2e 100644 --- a/lib/Transforms/IPO/LowerBitSets.cpp +++ b/lib/Transforms/IPO/LowerBitSets.cpp @@ -556,9 +556,8 @@ void LowerBitSets::buildBitSetsFromGlobals( } else { GlobalAlias *GAlias = GlobalAlias::create(Globals[I]->getType(), Globals[I]->getLinkage(), - "data", CombinedGlobalElemPtr, M); - if (Globals[I]->hasName()) - GAlias->takeName(Globals[I]); + "", CombinedGlobalElemPtr, M); + GAlias->takeName(Globals[I]); Globals[I]->replaceAllUsesWith(GAlias); } Globals[I]->eraseFromParent(); diff --git a/test/Transforms/LowerBitSets/unnamed.ll b/test/Transforms/LowerBitSets/unnamed.ll index 5ff0453391a..6f108e22d02 100644 --- a/test/Transforms/LowerBitSets/unnamed.ll +++ b/test/Transforms/LowerBitSets/unnamed.ll @@ -2,7 +2,8 @@ target datalayout = "e-p:32:32" -; CHECK: @data ={{.*}} alias +; CHECK: @{{[0-9]+}} = alias +; CHECK: @{{[0-9]+}} = alias @0 = constant i32 1 @1 = constant [2 x i32] [i32 2, i32 3] -- 2.34.1