]> granicus.if.org Git - clang/commitdiff
[Myriad] Use Generic_ELF::addClangTargetOptions()
authorDouglas Katzman <dougk@google.com>
Mon, 9 May 2016 19:09:59 +0000 (19:09 +0000)
committerDouglas Katzman <dougk@google.com>
Mon, 9 May 2016 19:09:59 +0000 (19:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268956 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.cpp
lib/Driver/ToolChains.h
test/Driver/myriad-toolchain.c

index 14b5381f08e98fd89f62e00126e34405c42a187d..b114ede653d5d9a66a783fab9852c6c6124926cd 100644 (file)
@@ -4401,7 +4401,7 @@ void XCoreToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
 
 MyriadToolChain::MyriadToolChain(const Driver &D, const llvm::Triple &Triple,
                                  const ArgList &Args)
-    : Generic_GCC(D, Triple, Args) {
+    : Generic_ELF(D, Triple, Args) {
   // If a target of 'sparc-myriad-elf' is specified to clang, it wants to use
   // 'sparc-myriad--elf' (note the unknown OS) as the canonical triple.
   // This won't work to find gcc. Instead we give the installation detector an
index 9a08d8e7d5f20a3f107e0e9c11a0c7fbd4edc213..307b2e95d17c0d2d3031cccd716e8fa367558f83 100644 (file)
@@ -1093,7 +1093,7 @@ public:
 
 /// MyriadToolChain - A tool chain using either clang or the external compiler
 /// installed by the Movidius SDK to perform all subcommands.
-class LLVM_LIBRARY_VISIBILITY MyriadToolChain : public Generic_GCC {
+class LLVM_LIBRARY_VISIBILITY MyriadToolChain : public Generic_ELF {
 public:
   MyriadToolChain(const Driver &D, const llvm::Triple &Triple,
                   const llvm::opt::ArgList &Args);
index 28dd4252a1ddd1caf07623d61094bdeb1a4fbef0..3e580ac77e313d1f93ded4cd2a76d576cd867684 100644 (file)
@@ -77,3 +77,7 @@
 
 // RUN: %clang -### -c -g %s -target sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %s
 // G_SPARC: "-debug-info-kind=limited" "-dwarf-version=2"
+
+// RUN: %clang -### -c %s -target sparc-myriad-elf -fuse-init-array 2>&1 \
+// RUN: | FileCheck -check-prefix=USE-INIT-ARRAY %s
+// USE-INIT-ARRAY-NOT: argument unused