Skip to content

Commit

Permalink
LowerBitSets: Do not assign names to aliases of unnamed bitset elemen…
Browse files Browse the repository at this point in the history
…t objects.

The restriction on unnamed aliases was removed in r239921. Mostly reverts
r239590, but we keep the test.

llvm-svn: 239923
  • Loading branch information
pcc committed Jun 17, 2015
1 parent 54fc298 commit 4fc603d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 2 additions & 3 deletions llvm/lib/Transforms/IPO/LowerBitSets.cpp
Expand Up @@ -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();
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/Transforms/LowerBitSets/unnamed.ll
Expand Up @@ -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]

Expand Down

0 comments on commit 4fc603d

Please sign in to comment.