diff options
Diffstat (limited to 'llvm')
7 files changed, 12 insertions, 18 deletions
diff --git a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp index c861373bd41..1f19a3b9779 100644 --- a/llvm/lib/Transforms/IPO/LowerTypeTests.cpp +++ b/llvm/lib/Transforms/IPO/LowerTypeTests.cpp @@ -1272,12 +1272,6 @@ void LowerTypeTestsModule::createJumpTable( createJumpTableEntry(AsmOS, ConstraintOS, JumpTableArch, AsmArgs, cast<Function>(Functions[I]->getGlobal())); - // Try to emit the jump table at the end of the text segment. - // Jump table must come after __cfi_check in the cross-dso mode. - // FIXME: this magic section name seems to do the trick. - F->setSection(ObjectFormat == Triple::MachO - ? "__TEXT,__text,regular,pure_instructions" - : ".text.cfi"); // Align the whole table by entry size. F->setAlignment(getJumpTableEntrySize()); // Skip prologue. diff --git a/llvm/test/Transforms/LowerTypeTests/function-arm-thumb.ll b/llvm/test/Transforms/LowerTypeTests/function-arm-thumb.ll index b8f7d08a1da..0e92207a27f 100644 --- a/llvm/test/Transforms/LowerTypeTests/function-arm-thumb.ll +++ b/llvm/test/Transforms/LowerTypeTests/function-arm-thumb.ll @@ -25,13 +25,13 @@ define void @h2() "target-features"="-thumb-mode" !type !1 { !0 = !{i32 0, !"typeid1"} !1 = !{i32 0, !"typeid2"} -; CHECK: define private void {{.*}} #[[AT:.*]] section ".text.cfi" align 4 { +; CHECK: define private void {{.*}} #[[AT:.*]] align 4 { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void asm sideeffect "b.w $0\0Ab.w $1\0A", "s,s"(void ()* @f1.cfi, void ()* @g1.cfi) ; CHECK-NEXT: unreachable ; CHECK-NEXT: } -; CHECK: define private void {{.*}} #[[AA:.*]] section ".text.cfi" align 4 { +; CHECK: define private void {{.*}} #[[AA:.*]] align 4 { ; CHECK-NEXT: entry: ; CHECK-NEXT: call void asm sideeffect "b $0\0Ab $1\0Ab $2\0A", "s,s,s"(void ()* @f2.cfi, void ()* @g2.cfi, void ()* @h2.cfi) ; CHECK-NEXT: unreachable diff --git a/llvm/test/Transforms/LowerTypeTests/function-disjoint.ll b/llvm/test/Transforms/LowerTypeTests/function-disjoint.ll index f39c8eec47c..d64d48a2266 100644 --- a/llvm/test/Transforms/LowerTypeTests/function-disjoint.ll +++ b/llvm/test/Transforms/LowerTypeTests/function-disjoint.ll @@ -39,10 +39,10 @@ define i1 @foo(i8* %p) { ret i1 %z } -; X64: define private void @[[JT0]]() #{{.*}} section ".text.cfi" align 8 { +; X64: define private void @[[JT0]]() #{{.*}} align 8 { ; X64: call void asm sideeffect "jmp ${0:c}@plt\0Aint3\0Aint3\0Aint3\0A", "s"(void ()* @f.cfi) -; X64: define private void @[[JT1]]() #{{.*}} section ".text.cfi" align 8 { +; X64: define private void @[[JT1]]() #{{.*}} align 8 { ; X64: call void asm sideeffect "jmp ${0:c}@plt\0Aint3\0Aint3\0Aint3\0A", "s"(void ()* @g.cfi) ; WASM32: ![[I0]] = !{i64 1} diff --git a/llvm/test/Transforms/LowerTypeTests/function-ext.ll b/llvm/test/Transforms/LowerTypeTests/function-ext.ll index 8318cad89d5..f6191e9e09a 100644 --- a/llvm/test/Transforms/LowerTypeTests/function-ext.ll +++ b/llvm/test/Transforms/LowerTypeTests/function-ext.ll @@ -22,5 +22,5 @@ declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone ; WASM-NOT: !{i64 0} ; WASM-NOT: !{i64 1} -; X64: define private void @[[JT]]() #{{.*}} section ".text.cfi" align {{.*}} { +; X64: define private void @[[JT]]() #{{.*}} align {{.*}} { ; X64: call void asm sideeffect "jmp ${0:c}@plt\0Aint3\0Aint3\0Aint3\0A", "s"(void ()* @foo) diff --git a/llvm/test/Transforms/LowerTypeTests/function-weak.ll b/llvm/test/Transforms/LowerTypeTests/function-weak.ll index e59641b0b03..57879760af7 100644 --- a/llvm/test/Transforms/LowerTypeTests/function-weak.ll +++ b/llvm/test/Transforms/LowerTypeTests/function-weak.ll @@ -50,8 +50,8 @@ define i1 @foo(i8* %p) { ret i1 %x } -; X86: define private void @[[JT]]() #{{.*}} section ".text.cfi" align 8 { -; ARM: define private void @[[JT]]() #{{.*}} section ".text.cfi" align 4 { +; X86: define private void @[[JT]]() #{{.*}} align 8 { +; ARM: define private void @[[JT]]() #{{.*}} align 4 { ; CHECK: define internal void @__cfi_global_var_init() section ".text.startup" { ; CHECK-NEXT: entry: diff --git a/llvm/test/Transforms/LowerTypeTests/function.ll b/llvm/test/Transforms/LowerTypeTests/function.ll index de984dfebd8..957bf06654d 100644 --- a/llvm/test/Transforms/LowerTypeTests/function.ll +++ b/llvm/test/Transforms/LowerTypeTests/function.ll @@ -48,10 +48,10 @@ define i1 @foo(i8* %p) { ret i1 %x } -; X86-LINUX: define private void @[[JT]]() #[[ATTR:.*]] section ".text.cfi" align 8 { -; X86-WIN32: define private void @[[JT]]() #[[ATTR:.*]] section ".text.cfi" align 8 { -; ARM: define private void @[[JT]]() #[[ATTR:.*]] section ".text.cfi" align 4 { -; THUMB: define private void @[[JT]]() #[[ATTR:.*]] section ".text.cfi" align 4 { +; X86-LINUX: define private void @[[JT]]() #[[ATTR:.*]] align 8 { +; X86-WIN32: define private void @[[JT]]() #[[ATTR:.*]] align 8 { +; ARM: define private void @[[JT]]() #[[ATTR:.*]] align 4 { +; THUMB: define private void @[[JT]]() #[[ATTR:.*]] align 4 { ; X86: jmp ${0:c}@plt ; X86-SAME: int3 diff --git a/llvm/test/Transforms/LowerTypeTests/section.ll b/llvm/test/Transforms/LowerTypeTests/section.ll index 9e812250113..131984deb21 100644 --- a/llvm/test/Transforms/LowerTypeTests/section.ll +++ b/llvm/test/Transforms/LowerTypeTests/section.ll @@ -19,7 +19,7 @@ entry: ret i1 %0 } -; CHECK: define private void @[[JT]]() #{{.*}} section ".text.cfi" align {{.*}} { +; CHECK: define private void @[[JT]]() #{{.*}} align {{.*}} { declare i1 @llvm.type.test(i8*, metadata) nounwind readnone |

