1; RUN: opt -passes=metarenamer -rename-exclude-function-prefixes=my_func -rename-exclude-global-prefixes=my_global -rename-exclude-struct-prefixes=my_struct -rename-exclude-alias-prefixes=my_alias -S %s | FileCheck %s 2 3; Check that excluded names don't get renamed while all the other ones do 4 5; CHECK: %my_struct1 = type { ptr, i32 } 6; CHECK: %my_struct2 = type { ptr, i32 } 7; CHECK-NOT: %other_struct = type { ptr, i32 } 8; CHECK: @my_global1 = global i32 42 9; CHECK: @my_global2 = global i32 24 10; CHECK-NOT: @other_global = global i32 24 11; CHECK: @my_alias1 = alias i32, ptr @my_global1 12; CHECK: @my_alias2 = alias i32, ptr @my_global2 13; CHECK-NOT: @other_alias = alias i32, ptr @other_global 14; CHECK: declare void @my_func1 15; CHECK: declare void @my_func2 16; CHECK-NOT: declare void @other_func 17 18; CHECK: call void @my_func1 19; CHECK: call void @my_func2 20; CHECK-NOT: call void @other_func 21; CHECK: load i32, ptr @my_global1 22; CHECK: load i32, ptr @my_global2 23; CHECK-NOT: load i32, ptr @other_global 24; CHECK: load i32, ptr @my_alias1 25; CHECK: load i32, ptr @my_alias2 26; CHECK-NOT: load i32, ptr @other_alias 27; CHECK: alloca %my_struct1 28; CHECK: alloca %my_struct2 29; CHECK-NOT: alloca %other_struct 30 31%my_struct1 = type { ptr, i32 } 32%my_struct2 = type { ptr, i32 } 33%other_struct = type { ptr, i32 } 34@my_global1 = global i32 42 35@my_global2 = global i32 24 36@other_global = global i32 24 37@my_alias1 = alias i32, ptr @my_global1 38@my_alias2 = alias i32, ptr @my_global2 39@other_alias = alias i32, ptr @other_global 40declare void @my_func1() 41declare void @my_func2() 42declare void @other_func() 43 44define void @some_func() { 45 call void @my_func1() 46 call void @my_func2() 47 call void @other_func() 48 %a = load i32, ptr @my_global1 49 %b = load i32, ptr @my_global2 50 %c = load i32, ptr @other_global 51 %d = load i32, ptr @my_alias1 52 %e = load i32, ptr @my_alias2 53 %f = load i32, ptr @other_alias 54 %g = alloca %my_struct1 55 %h = alloca %my_struct2 56 %i = alloca %other_struct 57 ret void 58} 59