1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Set missing options in LTOCodeGenerator::setTargetOptions.

Patch by Tom Roeder, I just added the test.

llvm-svn: 211317
This commit is contained in:
Rafael Espindola 2014-06-19 22:14:12 +00:00
parent 197fe3a33d
commit 9dbc86ae83
2 changed files with 28 additions and 0 deletions

View File

@ -141,6 +141,11 @@ void LTOCodeGenerator::setTargetOptions(TargetOptions options) {
Options.TrapFuncName = options.TrapFuncName;
Options.PositionIndependentExecutable = options.PositionIndependentExecutable;
Options.UseInitArray = options.UseInitArray;
Options.DataSections = options.DataSections;
Options.FunctionSections = options.FunctionSections;
Options.MCOptions = options.MCOptions;
Options.JTType = options.JTType;
}
void LTOCodeGenerator::setDebugInfo(lto_debug_model debug) {

View File

@ -0,0 +1,23 @@
; RUN: llvm-as <%s >%t1
; RUN: llvm-lto -o %t2 %t1 -jump-table-type=arity
; RUN: llvm-nm %t2 | FileCheck %s
; CHECK: T __llvm_jump_instr_table_0_1
; CHECK: T __llvm_jump_instr_table_1_1
target triple = "x86_64-unknown-linux-gnu"
define i32 @g(i32 %a) unnamed_addr jumptable {
ret i32 %a
}
define i32 @f() unnamed_addr jumptable {
ret i32 0
}
define i32 @main() {
ret i32 0
}
@llvm.used = appending global [2 x i8*] [i8* bitcast (i32(i32)* @g to i8*),
i8* bitcast (i32()* @f to i8*)]