[cfe-commits] r66425 - in /cfe/trunk/tools/ccc: ccclib/Arguments.py ccclib/Tools.py test/ccc/Xclang.c test/ccc/analyze.c
Daniel Dunbar
daniel at zuster.org
Mon Mar 9 10:43:52 PDT 2009
Author: ddunbar
Date: Mon Mar 9 12:43:51 2009
New Revision: 66425
URL: http://llvm.org/viewvc/llvm-project?rev=66425&view=rev
Log:
ccc: Parse -T{bss,data,text}, -iwithsysroot, -specs correctly.
Also, fix some test cases.
Modified:
cfe/trunk/tools/ccc/ccclib/Arguments.py
cfe/trunk/tools/ccc/ccclib/Tools.py
cfe/trunk/tools/ccc/test/ccc/Xclang.c
cfe/trunk/tools/ccc/test/ccc/analyze.c
Modified: cfe/trunk/tools/ccc/ccclib/Arguments.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Arguments.py?rev=66425&r1=66424&r2=66425&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Arguments.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Arguments.py Mon Mar 9 12:43:51 2009
@@ -536,6 +536,7 @@
self.printMultiDirectoryOption = self.addOption(FlagOption('-print-multi-directory'))
self.printMultiOsDirectoryOption = self.addOption(FlagOption('-print-multi-os-directory'))
self.printMultiLibOption = self.addOption(FlagOption('-print-multi-lib'))
+ self.addOption(SeparateOption('-specs', unsupported=True))
# Pipeline control
self.hashHashHashOption = self.addOption(FlagOption('-###'))
@@ -625,6 +626,7 @@
self.iwithprefixbeforeOption = self.addOption(JoinedOrSeparateOption('-iwithprefixbefore', self.iGroup))
self.addOption(JoinedOrSeparateOption('-iquote', self.iGroup))
self.isysrootOption = self.addOption(JoinedOrSeparateOption('-isysroot', self.iGroup))
+ self.iwithsysrootOption = self.addOption(JoinedOrSeparateOption('-iwithsysroot', self.iGroup))
self.includeOption = self.addOption(JoinedOrSeparateOption('-include', self.iGroup))
self.keep_private_externsOption = self.addOption(JoinedOrSeparateOption('-keep_private_externs'))
@@ -742,7 +744,13 @@
self.IOption = self.addOption(JoinedOrSeparateOption('-I', self.IGroup))
self.LOption = self.addOption(JoinedOrSeparateOption('-L'))
- self.TOption = self.addOption(JoinedOrSeparateOption('-T'))
+
+ self.TGroup = OptionGroup('-T')
+ self.addOption(JoinedOrSeparateOption('-Tbss', self.TGroup))
+ self.addOption(JoinedOrSeparateOption('-Tdata', self.TGroup))
+ self.addOption(JoinedOrSeparateOption('-Ttext', self.TGroup))
+ self.addOption(JoinedOrSeparateOption('-T', self.TGroup))
+
self.UOption = self.addOption(JoinedOrSeparateOption('-U'))
self.ZOption = self.addOption(JoinedOrSeparateOption('-Z'))
@@ -1044,9 +1052,10 @@
self.addOption(JoinedOption('--resource=', alias=self.f_compileResourceOption))
self.addOption(SeparateOption('--resource', alias=self.f_compileResourceOption,
forceJoinedRender=True))
- self.addOption(JoinedOption('--specs=', alias=self.specsOption))
+ self.addOption(JoinedOption('--specs=', alias=self.specsOption,
+ unsupported=True))
self.addOption(SeparateOption('--specs', alias=self.specsOption,
- forceJoinedRender=True))
+ forceJoinedRender=True, unsupported=True))
self.addOption(JoinedOption('--std=', alias=self.stdOption))
self.addOption(SeparateOption('--std', alias=self.stdOption,
forceJoinedRender=True))
Modified: cfe/trunk/tools/ccc/ccclib/Tools.py
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/ccclib/Tools.py?rev=66425&r1=66424&r2=66425&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/ccclib/Tools.py (original)
+++ cfe/trunk/tools/ccc/ccclib/Tools.py Mon Mar 9 12:43:51 2009
@@ -1239,7 +1239,7 @@
# endfile_spec is empty.
pass
- arglist.addAllArgs(cmd_args, arglist.parser.TOption)
+ arglist.addAllArgs(cmd_args, arglist.parser.TGroup)
arglist.addAllArgs(cmd_args, arglist.parser.FOption)
jobs.addJob(Jobs.Command(self.toolChain.getProgramPath('collect2'),
Modified: cfe/trunk/tools/ccc/test/ccc/Xclang.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/test/ccc/Xclang.c?rev=66425&r1=66424&r2=66425&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/test/ccc/Xclang.c (original)
+++ cfe/trunk/tools/ccc/test/ccc/Xclang.c Mon Mar 9 12:43:51 2009
@@ -1 +1 @@
-// RUN: xcc -fsyntax-only -Xclang --help %s | grep 'OVERVIEW: llvm clang cfe'
+// RUN: xcc -fsyntax-only -Xclang --help %s | grep "OVERVIEW: LLVM 'Clang' Compiler"
Modified: cfe/trunk/tools/ccc/test/ccc/analyze.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/ccc/test/ccc/analyze.c?rev=66425&r1=66424&r2=66425&view=diff
==============================================================================
--- cfe/trunk/tools/ccc/test/ccc/analyze.c (original)
+++ cfe/trunk/tools/ccc/test/ccc/analyze.c Mon Mar 9 12:43:51 2009
@@ -1,5 +1,5 @@
// RUN: xcc --analyze %s -o %t &&
-// RUN: grep '<string>Dereference of null pointer.</string>' %t &&
+// RUN: grep '<string>Dereference of null pointer</string>' %t &&
// RUN: xcc -### --analyze %s -Xanalyzer -check-that-program-halts &> %t &&
// RUN: grep 'check-that-program-halts' %t
More information about the cfe-commits
mailing list