Files
clang-p2996/clang/test/CodeGen/dwarf-version.c
Manman Ren 38db092083 Debug Info: set default to gdwarf-2 for Darwin.
Darwin systems currently do not support dwarf version 3 or above. When we are
ready, we can bump the default to gdwarf-4 for Darwin.

For other systems, the default is dwarf version 3, if everything goes smoothly,
we can bump the version to 4.

rdar://13591116

llvm-svn: 185483
2013-07-02 23:15:25 +00:00

15 lines
849 B
C

// RUN: %clang -target x86_64-linux-gnu -gdwarf-2 -S -emit-llvm -o - %s | FileCheck %s
// RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3
// RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=LINUX
// RUN: %clang -target x86_64-apple-darwin -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=DARWIN
int main (void) {
return 0;
}
// CHECK: metadata !{i32 2, metadata !"Dwarf Version", i32 2}
// VER3: metadata !{i32 2, metadata !"Dwarf Version", i32 3}
// VER4: metadata !{i32 2, metadata !"Dwarf Version", i32 4}
// LINUX: metadata !{i32 2, metadata !"Dwarf Version", i32 3}
// DARWIN: metadata !{i32 2, metadata !"Dwarf Version", i32 2}