r219901 - specify dwarf version for Solaris
Alexander Eremin
alexander.r.eremin at gmail.com
Wed Oct 15 22:55:24 PDT 2014
Author: alhazred
Date: Thu Oct 16 00:55:24 2014
New Revision: 219901
URL: http://llvm.org/viewvc/llvm-project?rev=219901&view=rev
Log:
specify dwarf version for Solaris
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/CodeGen/dwarf-version.c
cfe/trunk/test/Driver/clang-g-opts.c
cfe/trunk/test/Driver/debug-options.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=219901&r1=219900&r2=219901&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Oct 16 00:55:24 2014
@@ -3146,10 +3146,11 @@ void Clang::ConstructJob(Compilation &C,
// FIXME: we should support specifying dwarf version with
// -gline-tables-only.
CmdArgs.push_back("-gline-tables-only");
- // Default is dwarf-2 for Darwin, OpenBSD and FreeBSD.
+ // Default is dwarf-2 for Darwin, OpenBSD, FreeBSD and Solaris.
const llvm::Triple &Triple = getToolChain().getTriple();
if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::OpenBSD ||
- Triple.getOS() == llvm::Triple::FreeBSD)
+ Triple.getOS() == llvm::Triple::FreeBSD ||
+ Triple.getOS() == llvm::Triple::Solaris)
CmdArgs.push_back("-gdwarf-2");
} else if (A->getOption().matches(options::OPT_gdwarf_2))
CmdArgs.push_back("-gdwarf-2");
@@ -3159,10 +3160,11 @@ void Clang::ConstructJob(Compilation &C,
CmdArgs.push_back("-gdwarf-4");
else if (!A->getOption().matches(options::OPT_g0) &&
!A->getOption().matches(options::OPT_ggdb0)) {
- // Default is dwarf-2 for Darwin, OpenBSD and FreeBSD.
+ // Default is dwarf-2 for Darwin, OpenBSD, FreeBSD and Solaris.
const llvm::Triple &Triple = getToolChain().getTriple();
if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::OpenBSD ||
- Triple.getOS() == llvm::Triple::FreeBSD)
+ Triple.getOS() == llvm::Triple::FreeBSD ||
+ Triple.getOS() == llvm::Triple::Solaris)
CmdArgs.push_back("-gdwarf-2");
else
CmdArgs.push_back("-g");
Modified: cfe/trunk/test/CodeGen/dwarf-version.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/dwarf-version.c?rev=219901&r1=219900&r2=219901&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/dwarf-version.c (original)
+++ cfe/trunk/test/CodeGen/dwarf-version.c Thu Oct 16 00:55:24 2014
@@ -5,6 +5,7 @@
// RUN: %clang -target x86_64-apple-darwin -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
// RUN: %clang -target powerpc-unknown-openbsd -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
// RUN: %clang -target powerpc-unknown-freebsd -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
+// RUN: %clang -target i386-pc-solaris -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
int main (void) {
return 0;
}
Modified: cfe/trunk/test/Driver/clang-g-opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-g-opts.c?rev=219901&r1=219900&r2=219901&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-g-opts.c (original)
+++ cfe/trunk/test/Driver/clang-g-opts.c Thu Oct 16 00:55:24 2014
@@ -17,6 +17,8 @@
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
// RUN: %clang -### -S %s -g0 -g -target x86_64-pc-freebsd10.0 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
+// RUN: %clang -### -S %s -g0 -g -target i386-pc-solaris 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
// CHECK-WITHOUT-G-NOT: "-g"
// CHECK-WITH-G: "-g"
Modified: cfe/trunk/test/Driver/debug-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug-options.c?rev=219901&r1=219900&r2=219901&view=diff
==============================================================================
--- cfe/trunk/test/Driver/debug-options.c (original)
+++ cfe/trunk/test/Driver/debug-options.c Thu Oct 16 00:55:24 2014
@@ -51,6 +51,8 @@
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-pc-freebsd10.0 2>&1 \
// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
+// RUN: %clang -### -c -gline-tables-only -g %s -target i386-pc-solaris 2>&1 \
+// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
// RUN: %clang -### -c -gline-tables-only -g0 %s 2>&1 \
// RUN: | FileCheck -check-prefix=GLTO_NO %s
//
More information about the cfe-commits
mailing list