Index: include/llvm/Config/config.h.cmake =================================================================== --- include/llvm/Config/config.h.cmake +++ include/llvm/Config/config.h.cmake @@ -421,7 +421,7 @@ #cmakedefine LLVM_DATADIR "${LLVM_DATADIR}" /* Target triple LLVM will generate code for by default */ -#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" +#define LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" /* Installation directory for documentation */ #cmakedefine LLVM_DOCSDIR "${LLVM_DOCSDIR}" Index: test/BugPoint/remove_arguments_test.ll =================================================================== --- test/BugPoint/remove_arguments_test.ll +++ test/BugPoint/remove_arguments_test.ll @@ -5,7 +5,7 @@ ; Test to make sure that arguments are removed from the function if they are ; unnecessary. And clean up any types that frees up too. -; CHECK: target triple +; CHECK: ModuleID ; CHECK-NOT: struct.anon %struct.anon = type { i32 } Index: test/CodeGen/Generic/lit.local.cfg =================================================================== --- test/CodeGen/Generic/lit.local.cfg +++ test/CodeGen/Generic/lit.local.cfg @@ -1,3 +1,3 @@ -if 'native' not in config.available_features: - config.unsupported = True +if not config.target_triple: + config.unsupported = True \ No newline at end of file Index: test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll =================================================================== --- test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll +++ test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple define void @iterative_hash_host_wide_int() { %zero = alloca i32 ; [#uses=2] Index: test/CodeGen/PowerPC/2006-08-15-SelectionCrash.ll =================================================================== --- test/CodeGen/PowerPC/2006-08-15-SelectionCrash.ll +++ test/CodeGen/PowerPC/2006-08-15-SelectionCrash.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple %struct..0anon = type { i32 } %struct.rtx_def = type { i16, i8, i8, [1 x %struct..0anon] } Index: test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll =================================================================== --- test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll +++ test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll @@ -1,6 +1,7 @@ ; RUN: llc < %s -march=ppc64 ; RUN: llc < %s -march=ppc32 ; RUN: llc < %s +; REQUIRES: default_triple define void @bitap() { entry: Index: test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll =================================================================== --- test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll +++ test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll @@ -1,6 +1,7 @@ ; RUN: llc < %s -march=ppc64 ; RUN: llc < %s -march=ppc32 ; RUN: llc < %s +; REQUIRES: default_triple @qsz.b = external global i1 ; [#uses=1] Index: test/CodeGen/PowerPC/2007-11-19-VectorSplitting.ll =================================================================== --- test/CodeGen/PowerPC/2007-11-19-VectorSplitting.ll +++ test/CodeGen/PowerPC/2007-11-19-VectorSplitting.ll @@ -2,6 +2,7 @@ ; RUN: llc < %s -march=ppc32 -mcpu=g3 ; RUN: llc < %s -march=ppc32 -mcpu=g5 ; PR1811 +; REQUIRES: default_triple define void @execute_shader(<4 x float>* %OUT, <4 x float>* %IN, <4 x float>* %CONST) { Index: test/CodeGen/PowerPC/load-shift-combine.ll =================================================================== --- test/CodeGen/PowerPC/load-shift-combine.ll +++ test/CodeGen/PowerPC/load-shift-combine.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple ; This used to cause a crash. A standard load is converted to a pre-increment ; load. Later the pre-increment load is combined with a subsequent SRL to Index: test/CodeGen/X86/2006-10-02-BoolRetCrash.ll =================================================================== --- test/CodeGen/X86/2006-10-02-BoolRetCrash.ll +++ test/CodeGen/X86/2006-10-02-BoolRetCrash.ll @@ -1,5 +1,6 @@ ; RUN: llc < %s ; PR933 +; REQUIRES: default_triple define fastcc i1 @test() { ret i1 true Index: test/CodeGen/X86/2009-06-05-VariableIndexInsert.ll =================================================================== --- test/CodeGen/X86/2009-06-05-VariableIndexInsert.ll +++ test/CodeGen/X86/2009-06-05-VariableIndexInsert.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple define <2 x i64> @_mm_insert_epi16(<2 x i64> %a, i32 %b, i32 %imm) nounwind readnone { entry: Index: test/CodeGen/X86/2009-06-06-ConcatVectors.ll =================================================================== --- test/CodeGen/X86/2009-06-06-ConcatVectors.ll +++ test/CodeGen/X86/2009-06-06-ConcatVectors.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple define <2 x i64> @_mm_movpi64_pi64(<1 x i64> %a, <1 x i64> %b) nounwind readnone { entry: Index: test/CodeGen/X86/2010-02-01-DbgValueCrash.ll =================================================================== --- test/CodeGen/X86/2010-02-01-DbgValueCrash.ll +++ test/CodeGen/X86/2010-02-01-DbgValueCrash.ll @@ -1,4 +1,6 @@ ; RUN: llc -O1 < %s +; REQUIRES: default_triple + ; ModuleID = 'pr6157.bc' ; formerly crashed in SelectionDAGBuilder Index: test/CodeGen/X86/2010-07-06-DbgCrash.ll =================================================================== --- test/CodeGen/X86/2010-07-06-DbgCrash.ll +++ test/CodeGen/X86/2010-07-06-DbgCrash.ll @@ -1,4 +1,5 @@ ; RUN: llc -O0 -relocation-model pic < %s -o /dev/null +; REQUIRES: default_triple ; PR7545 @.str = private constant [4 x i8] c"one\00", align 1 ; <[4 x i8]*> [#uses=1] @.str1 = private constant [4 x i8] c"two\00", align 1 ; <[5 x i8]*> [#uses=1] Index: test/CodeGen/X86/GC/alloc_loop.ll =================================================================== --- test/CodeGen/X86/GC/alloc_loop.ll +++ test/CodeGen/X86/GC/alloc_loop.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple declare i8* @llvm_gc_allocate(i32) Index: test/CodeGen/X86/GC/cg-O0.ll =================================================================== --- test/CodeGen/X86/GC/cg-O0.ll +++ test/CodeGen/X86/GC/cg-O0.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s -O0 +; REQUIRES: default_triple define i32 @main() { entry: Index: test/CodeGen/X86/GC/lower_gcroot.ll =================================================================== --- test/CodeGen/X86/GC/lower_gcroot.ll +++ test/CodeGen/X86/GC/lower_gcroot.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple %Env = type i8* Index: test/CodeGen/X86/extractelement-shuffle.ll =================================================================== --- test/CodeGen/X86/extractelement-shuffle.ll +++ test/CodeGen/X86/extractelement-shuffle.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple ; Examples that exhibits a bug in DAGCombine. The case is triggered by the ; following program. The bug is DAGCombine assumes that the bit convert Index: test/CodeGen/X86/vshift_scalar.ll =================================================================== --- test/CodeGen/X86/vshift_scalar.ll +++ test/CodeGen/X86/vshift_scalar.ll @@ -1,4 +1,5 @@ ; RUN: llc < %s +; REQUIRES: default_triple ; Legalization test that requires scalarizing a vector. Index: test/DebugInfo/lit.local.cfg =================================================================== --- test/DebugInfo/lit.local.cfg +++ test/DebugInfo/lit.local.cfg @@ -1,3 +1,3 @@ -if 'native' not in config.available_features: - config.unsupported = True +if not config.target_triple: + config.unsupported = True \ No newline at end of file Index: test/Feature/optnone-llc.ll =================================================================== --- test/Feature/optnone-llc.ll +++ test/Feature/optnone-llc.ll @@ -4,7 +4,7 @@ ; RUN: llc -O3 -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-Ox ; RUN: llc -misched-postra -debug %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=LLC-MORE -; REQUIRES: asserts, native +; REQUIRES: asserts ; This test verifies that we don't run Machine Function optimizations ; on optnone functions. Index: test/Feature/optnone.ll =================================================================== --- test/Feature/optnone.ll +++ test/Feature/optnone.ll @@ -1,5 +1,4 @@ ; RUN: llvm-as < %s | llvm-dis | FileCheck %s -; REQUIRE: native ; Check for the presence of attribute optnone in the disassembly. Index: test/LTO/X86/bcsection.ll =================================================================== --- test/LTO/X86/bcsection.ll +++ test/LTO/X86/bcsection.ll @@ -15,6 +15,8 @@ ; RUN: llvm-lto -exported-symbol=main -exported-symbol=_main -o %T/bcsection.macho.o %T/bcsection.macho.bco ; RUN: llvm-nm %T/bcsection.macho.o | FileCheck %s +; REQUIRES: default_triple + ; CHECK: main define i32 @main() { ret i32 0 Index: test/LTO/X86/current-section.ll =================================================================== --- test/LTO/X86/current-section.ll +++ test/LTO/X86/current-section.ll @@ -1,4 +1,5 @@ ; RUN: llvm-as < %s >%t1 ; RUN: llvm-lto -o %t2 %t1 +; REQUIRES: default_triple module asm ".align 4" Index: test/LTO/X86/list-symbols.ll =================================================================== --- test/LTO/X86/list-symbols.ll +++ test/LTO/X86/list-symbols.ll @@ -1,6 +1,7 @@ ; RUN: llvm-as -o %T/1.bc %s ; RUN: llvm-as -o %T/2.bc %S/Inputs/list-symbols.ll ; RUN: llvm-lto -list-symbols-only %T/1.bc %T/2.bc | FileCheck %s +; REQUIRES: default_triple ; CHECK-LABEL: 1.bc: ; CHECK-DAG: foo Index: test/Linker/subprogram-linkonce-weak.ll =================================================================== --- test/Linker/subprogram-linkonce-weak.ll +++ test/Linker/subprogram-linkonce-weak.ll @@ -1,8 +1,8 @@ -; REQUIRES: native ; RUN: llvm-link %s %S/Inputs/subprogram-linkonce-weak.ll -S -o %t1 ; RUN: FileCheck %s -check-prefix=LW -check-prefix=CHECK <%t1 ; RUN: llvm-link %S/Inputs/subprogram-linkonce-weak.ll %s -S -o %t2 ; RUN: FileCheck %s -check-prefix=WL -check-prefix=CHECK <%t2 +; REQUIRES: default_triple ; This testcase tests the following flow: ; - File A defines a linkonce version of @foo which has inlined into @bar. Index: test/Linker/type-unique-odr-a.ll =================================================================== --- test/Linker/type-unique-odr-a.ll +++ test/Linker/type-unique-odr-a.ll @@ -1,4 +1,5 @@ -; REQUIRES: object-emission, native +; REQUIRES: default_triple +; REQUIRES: object-emission ; ; RUN: llvm-link %s %p/type-unique-odr-b.ll -S -o - | %llc_dwarf -dwarf-linkage-names=Enable -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; Index: test/Linker/type-unique-simple-a.ll =================================================================== --- test/Linker/type-unique-simple-a.ll +++ test/Linker/type-unique-simple-a.ll @@ -1,4 +1,5 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission +; REQUIRES: default_triple ; RUN: llvm-link %s %p/type-unique-simple-b.ll -S -o %t ; RUN: cat %t | FileCheck %s -check-prefix=LINK Index: test/Linker/type-unique-simple2-a.ll =================================================================== --- test/Linker/type-unique-simple2-a.ll +++ test/Linker/type-unique-simple2-a.ll @@ -1,4 +1,5 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission +; REQUIRES: default_triple ; ; RUN: llvm-link %s %p/type-unique-simple2-b.ll -S -o - | %llc_dwarf -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; Index: test/Linker/type-unique-simple2.ll =================================================================== --- test/Linker/type-unique-simple2.ll +++ test/Linker/type-unique-simple2.ll @@ -1,4 +1,5 @@ -; REQUIRES: object-emission; native +; REQUIRES: object-emission +; REQUIRES: default_triple ; RUN: llvm-link %S/Inputs/type-unique-simple2-a.ll %S/Inputs/type-unique-simple2-b.ll -S -o %t ; RUN: cat %t | FileCheck %S/Inputs/type-unique-simple2-a.ll -check-prefix=LINK Index: test/Linker/type-unique-type-array-a.ll =================================================================== --- test/Linker/type-unique-type-array-a.ll +++ test/Linker/type-unique-type-array-a.ll @@ -1,4 +1,5 @@ -; REQUIRES: object-emission, native +; REQUIRES: object-emission +; REQUIRES: default_triple ; ; RUN: llvm-link %s %p/type-unique-type-array-b.ll -S -o - | %llc_dwarf -filetype=obj -O0 | llvm-dwarfdump -debug-dump=info - | FileCheck %s ; Index: test/MC/ELF/cfi-version.ll =================================================================== --- test/MC/ELF/cfi-version.ll +++ test/MC/ELF/cfi-version.ll @@ -4,6 +4,7 @@ ; .debug_frame is not emitted for targeting Windows x64. ; REQUIRES: debug_frame +; REQUIRES: default_triple ; Function Attrs: nounwind define i32 @foo() #0 { Index: test/Other/2010-05-06-Printer.ll =================================================================== --- test/Other/2010-05-06-Printer.ll +++ test/Other/2010-05-06-Printer.ll @@ -1,5 +1,5 @@ -; REQUIRES: native ; RUN: llc -O2 -print-after-all < %s 2>/dev/null +; REQUIRES: default_triple define void @tester(){ ret void Index: test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll =================================================================== --- test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll +++ test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll @@ -1,5 +1,6 @@ ; RUN: opt < %s -O3 | llc -no-integrated-as | FileCheck %s -; REQUIRES: X86 +; REQUIRES: default_triple + ;; We don't want branch folding to fold asm directives. ; CHECK: bork_directive @@ -11,7 +12,7 @@ %tmp = icmp eq i32 %param, 0 br i1 %tmp, label %cond_true, label %cond_false -cond_true: +cond_true: call void asm sideeffect ".bork_directive /* ${0:c}:${1:c} */", "i,i,~{dirflag},~{fpsr},~{flags}"( i32 37, i32 927 ) ret void Index: test/lit.cfg =================================================================== --- test/lit.cfg +++ test/lit.cfg @@ -340,11 +340,13 @@ else: config.available_features.add("nozlib") -# Native compilation: host arch == target arch and native backend built-in +if config.target_triple: + config.available_features.add("default_triple") + +# Native compilation: host arch == default triple arch # FIXME: Consider cases that target can be executed # even if host_triple were different from target_triple. -if (config.host_triple == config.target_triple and - config.native_target in config.targets_to_build): +if config.host_triple == config.target_triple: config.available_features.add("native") import subprocess Index: test/tools/llvm-mc/fatal_warnings.test =================================================================== --- test/tools/llvm-mc/fatal_warnings.test +++ test/tools/llvm-mc/fatal_warnings.test @@ -1,6 +1,6 @@ # RUN: not llvm-mc --fatal-warnings %s 2>&1 | FileCheck %s # XFAIL: hexagon -# REQUIRES: native +; REQUIRES: default_triple # CHECK: error: .warning directive invoked in source file .warning Index: test/tools/llvm-mc/line_end_with_space.test =================================================================== --- test/tools/llvm-mc/line_end_with_space.test +++ test/tools/llvm-mc/line_end_with_space.test @@ -1,2 +1,3 @@ RUN: llvm-mc -disassemble %s -# REQUIRES: native +; REQUIRES: default_triple + Index: test/tools/llvm-mc/no_warnings.test =================================================================== --- test/tools/llvm-mc/no_warnings.test +++ test/tools/llvm-mc/no_warnings.test @@ -1,6 +1,6 @@ # RUN: llvm-mc --no-warn %s 2>&1 | FileCheck %s # XFAIL: hexagon -# REQUIRES: native +; REQUIRES: default_triple # CHECK-NOT: warning: .warning