diff options
author | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2015-03-23 12:10:34 -0700 |
commit | ebe69fe11e48d322045d5949c83283927a0d790b (patch) | |
tree | c92f1907a6b8006628a4b01615f38264d29834ea /test/SymbolRewriter | |
parent | b7d2e72b02a4cb8034f32f8247a2558d2434e121 (diff) | |
download | external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.zip external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.gz external_llvm-ebe69fe11e48d322045d5949c83283927a0d790b.tar.bz2 |
Update aosp/master LLVM for rebase to r230699.
Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
Diffstat (limited to 'test/SymbolRewriter')
-rw-r--r-- | test/SymbolRewriter/rewrite.ll | 33 | ||||
-rw-r--r-- | test/SymbolRewriter/rewrite.map | 20 |
2 files changed, 53 insertions, 0 deletions
diff --git a/test/SymbolRewriter/rewrite.ll b/test/SymbolRewriter/rewrite.ll index 716fff9..e8a0db6 100644 --- a/test/SymbolRewriter/rewrite.ll +++ b/test/SymbolRewriter/rewrite.ll @@ -28,12 +28,40 @@ entry: ret void } +$source_comdat_function = comdat any +define dllexport void @source_comdat_function() comdat($source_comdat_function) { +entry: + ret void +} + +$source_comdat_function_1 = comdat exactmatch +define dllexport void @source_comdat_function_1() comdat($source_comdat_function_1) { +entry: + ret void +} + +$source_comdat_variable = comdat largest +@source_comdat_variable = global i32 32, comdat($source_comdat_variable) + +$source_comdat_variable_1 = comdat noduplicates +@source_comdat_variable_1 = global i32 64, comdat($source_comdat_variable_1) + +; CHECK: $target_comdat_function = comdat any +; CHECK: $target_comdat_function_1 = comdat exactmatch +; CHECK: $target_comdat_variable = comdat largest +; CHECK: $target_comdat_variable_1 = comdat noduplicates + ; CHECK: @target_variable = external global i32 ; CHECK-NOT: @source_variable = external global i32 ; CHECK: @target_pattern_variable = external global i32 ; CHECK-NOT: @source_pattern_variable = external global i32 ; CHECK: @target_pattern_multiple_variable_matches = external global i32 ; CHECK-NOT: @source_pattern_multiple_variable_matches = external global i32 +; CHECK: @target_comdat_variable = global i32 32, comdat +; CHECK-NOT: @source_comdat_variable = global i32 32, comdat +; CHECK: @target_comdat_variable_1 = global i32 64, comdat +; CHECK-NOT: @source_comdat_variable_1 = global i32 64, comdat + ; CHECK: declare void @target_function() ; CHECK-NOT: declare void @source_function() ; CHECK: declare void @target_pattern_function() @@ -57,3 +85,8 @@ entry: ; CHECK: ret i32 %res ; CHECK: } +; CHECK: define dllexport void @target_comdat_function() comdat +; CHECK-NOT: define dllexport void @source_comdat_function() comdat +; CHECK: define dllexport void @target_comdat_function_1() comdat +; CHECK-NOT: define dllexport void @source_comdat_function_1() comdat + diff --git a/test/SymbolRewriter/rewrite.map b/test/SymbolRewriter/rewrite.map index ef6dfc8..8094939 100644 --- a/test/SymbolRewriter/rewrite.map +++ b/test/SymbolRewriter/rewrite.map @@ -44,3 +44,23 @@ global alias: { target: _ZN1SD1Ev, } +function: { + source: source_comdat_function, + target: target_comdat_function, +} + +function: { + source: source_comdat_function_(.*), + transform: target_comdat_function_\1, +} + +global variable: { + source: source_comdat_variable, + target: target_comdat_variable, +} + +global variable: { + source: source_comdat_variable_(.*), + transform: target_comdat_variable_\1, +} + |