llvm.org GIT mirror llvm / 3c278b1
Remember to eraseFromParent after replaceAllUsesWith. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217536 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 5 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
11 ; RUN: llvm-as %p/Inputs/alias-1.ll -o %t2.o
22 ; RUN: ld -shared -o %t3.o -plugin %llvmshlibdir/LLVMgold.so %t2.o %t.o \
33 ; RUN: -plugin-opt=emit-llvm
4 ; RUN: llvm-dis %t3.o -o - | FileCheck %s
4 ; RUN: llvm-dis < %t3.o -o - | FileCheck %s
55
6 ; CHECK-NOT: alias
67 ; CHECK: @a = global i32 42
7 ; CHECK: @b = global i32 1
8 ; CHECK-NEXT: @b = global i32 1
9 ; CHECK-NOT: alias
810
911 @a = weak alias i32* @b
1012 @b = global i32 1
456456 /*Initializer*/ nullptr);
457457 Var->takeName(&Alias);
458458 Alias.replaceAllUsesWith(Var);
459 Alias.eraseFromParent();
459460 }
460461
461462 static const char *getResolutionName(ld_plugin_symbol_resolution R) {