]> granicus.if.org Git - clang/log
clang
15 years agoVariables marked as "extern" can actually have internal linkage if
Douglas Gregor [Thu, 19 Mar 2009 22:01:50 +0000 (22:01 +0000)]
Variables marked as "extern" can actually have internal linkage if
there is a previous declaration marked "static". This fixes PR3645.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67336 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test cases for PR 3820.
Ted Kremenek [Thu, 19 Mar 2009 19:50:58 +0000 (19:50 +0000)]
Add test cases for PR 3820.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67327 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPer Daniel's suggestion, remove default case from switch statement to make
Ted Kremenek [Thu, 19 Mar 2009 19:02:20 +0000 (19:02 +0000)]
Per Daniel's suggestion, remove default case from switch statement to make
uncaught language cases a compile warning instead of a runtime error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67325 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd link to new page
Chris Lattner [Thu, 19 Mar 2009 18:58:22 +0000 (18:58 +0000)]
add link to new page

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolink to diags page.
Chris Lattner [Thu, 19 Mar 2009 18:57:33 +0000 (18:57 +0000)]
link to diags page.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67323 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove most of the diags info out to its own file.
Chris Lattner [Thu, 19 Mar 2009 18:56:04 +0000 (18:56 +0000)]
move most of the diags info out to its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67321 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow notes to be printed following a fatal error, then suppress any
Douglas Gregor [Thu, 19 Mar 2009 18:55:06 +0000 (18:55 +0000)]
Allow notes to be printed following a fatal error, then suppress any
diagnostics following those notes.

Make exceeding the template instantiation depth a fatal error.

Thanks to Daniel for pointing out the problem!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67320 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit diagnostics examples out to its own file.
Chris Lattner [Thu, 19 Mar 2009 18:52:17 +0000 (18:52 +0000)]
split diagnostics examples out to its own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67318 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a clarifying comment about HasPrototype's computation
Douglas Gregor [Thu, 19 Mar 2009 18:33:54 +0000 (18:33 +0000)]
Add a clarifying comment about HasPrototype's computation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67316 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport langkind_cxx_pch when determining the language dialect.
Ted Kremenek [Thu, 19 Mar 2009 18:21:42 +0000 (18:21 +0000)]
Support langkind_cxx_pch when determining the language dialect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67315 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen looking for property name (or getter method) in a
Fariborz Jahanian [Thu, 19 Mar 2009 18:15:34 +0000 (18:15 +0000)]
When looking for property name (or getter method) in a
dot-syntax expression after earching the list of protocols
in the qualified-id, must keep searching the protocol list
of each of the protocols in the list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67314 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf a function is declared as, e.g.,
Douglas Gregor [Thu, 19 Mar 2009 18:14:46 +0000 (18:14 +0000)]
If a function is declared as, e.g.,

  F f;

where F is a typedef of a function type, then the function "f" has a
prototype. This is a slight tweak to Chris's suggested fix in
PR3817. Fixes PR3817 and PR3840.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67313 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver/clang: -mattr strings were not comma separated.
Daniel Dunbar [Thu, 19 Mar 2009 17:36:04 +0000 (17:36 +0000)]
Driver/clang: -mattr strings were not comma separated.
 - Apologies for commits w/o test cases; they are coming.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67310 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce a new expression type, UnresolvedDeclRefExpr, that describes
Douglas Gregor [Thu, 19 Mar 2009 17:26:29 +0000 (17:26 +0000)]
Introduce a new expression type, UnresolvedDeclRefExpr, that describes
dependent qualified-ids such as

  Fibonacci<N - 1>::value

where N is a template parameter. These references are "unresolved"
because the name is dependent and, therefore, cannot be resolved to a
declaration node (as we would do for a DeclRefExpr or
QualifiedDeclRefExpr). UnresolvedDeclRefExprs instantiate to
DeclRefExprs, QualifiedDeclRefExprs, etc.

Also, be a bit more careful about keeping only a single set of
specializations for a class template, and instantiating from the
definition of that template rather than a previous declaration. In
general, we need a better solution for this for all TagDecls, because
it's too easy to accidentally look at a declaration that isn't the
definition.

We can now process a simple Fibonacci computation described as a
template metaprogram.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67308 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIRgen support for alias of global variable.
Daniel Dunbar [Thu, 19 Mar 2009 08:27:24 +0000 (08:27 +0000)]
IRgen support for alias of global variable.
 - PR3818.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Compilation::Execute wasn't returning result code correctly.
Daniel Dunbar [Thu, 19 Mar 2009 08:03:45 +0000 (08:03 +0000)]
Driver: Compilation::Execute wasn't returning result code correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67296 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Executing piped jobs with a single command is easy.
Daniel Dunbar [Thu, 19 Mar 2009 08:01:45 +0000 (08:01 +0000)]
Driver: Executing piped jobs with a single command is easy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67295 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Claim unused input arguments when emitting "input file unused"
Daniel Dunbar [Thu, 19 Mar 2009 07:57:08 +0000 (07:57 +0000)]
Driver: Claim unused input arguments when emitting "input file unused"
diagnostic (to suppress more generic unused warning).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Claim -arch options when pipelining, and claim arguments that
Daniel Dunbar [Thu, 19 Mar 2009 07:55:12 +0000 (07:55 +0000)]
Driver: Claim -arch options when pipelining, and claim arguments that
are forwarded to GCC.
 - The later is unfortunate, as it prevents us from generally warning
   about anything interesting on platforms that use a generic
   toolchain. However, we can't do much better without significantly
   complicating things, and generally we should have proper tool chain
   definitions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67293 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Handle "linker input" arguments.
Daniel Dunbar [Thu, 19 Mar 2009 07:29:38 +0000 (07:29 +0000)]
Driver: Handle "linker input" arguments.
 - Make InputInfo a variant of filename, pipe, input argument,
   nothing.

 - Leave a FIXME in InputInfo that this should be revisited.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67292 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add Arg::renderAsInput; this is a messy area and something I
Daniel Dunbar [Thu, 19 Mar 2009 07:22:40 +0000 (07:22 +0000)]
Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a note
Chris Lattner [Thu, 19 Mar 2009 07:06:44 +0000 (07:06 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67290 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate our bragging about diagnostics. :)
Chris Lattner [Thu, 19 Mar 2009 06:52:51 +0000 (06:52 +0000)]
update our bragging about diagnostics. :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67289 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd NestedNameSpecifier.h/cpp to the xcode project file for browsing.
Chris Lattner [Thu, 19 Mar 2009 04:52:30 +0000 (04:52 +0000)]
add NestedNameSpecifier.h/cpp to the xcode project file for browsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67285 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint the context of tag types as part of pretty-printing, e.g.,
Douglas Gregor [Thu, 19 Mar 2009 04:25:59 +0000 (04:25 +0000)]
Print the context of tag types as part of pretty-printing, e.g.,

  struct N::M::foo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67284 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGeneralize printing of nested-name-specifier sequences for use in both
Douglas Gregor [Thu, 19 Mar 2009 03:51:16 +0000 (03:51 +0000)]
Generalize printing of nested-name-specifier sequences for use in both
QualifiedNameType and QualifiedDeclRefExpr. We now keep track of the
exact nested-name-specifier spelling for a QualifiedDeclRefExpr, and
use that spelling when printing ASTs. This fixes PR3493.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67283 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build
Ted Kremenek [Thu, 19 Mar 2009 01:51:49 +0000 (01:51 +0000)]
Update checker build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67279 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPlist diagnostics: distinguish between regular and extended messages for "events".
Ted Kremenek [Thu, 19 Mar 2009 00:42:56 +0000 (00:42 +0000)]
Plist diagnostics: distinguish between regular and extended messages for "events".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67269 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoExtend the use of QualifiedNameType to the creation of class template
Douglas Gregor [Thu, 19 Mar 2009 00:39:20 +0000 (00:39 +0000)]
Extend the use of QualifiedNameType to the creation of class template
specialization names. This way, we keep track of sugared types like

  std::vector<Real>

I believe we are now using QualifiedNameTypes everywhere we can. Next
step: QualifiedDeclRefExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67268 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEncode ivar access control info.
Devang Patel [Thu, 19 Mar 2009 00:23:53 +0000 (00:23 +0000)]
Encode ivar access control info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67267 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build.
Ted Kremenek [Thu, 19 Mar 2009 00:20:07 +0000 (00:20 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67266 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIntroduce a representation for types that we referred to via a
Douglas Gregor [Thu, 19 Mar 2009 00:18:19 +0000 (00:18 +0000)]
Introduce a representation for types that we referred to via a
qualified name, e.g.,

  foo::x

so that we retain the nested-name-specifier as written in the source
code and can reproduce that qualified name when printing the types
back (e.g., in diagnostics). This is PR3493, which won't be complete
until finished the other tasks mentioned near the end of this commit.

The parser's representation of nested-name-specifiers, CXXScopeSpec,
is now a bit fatter, because it needs to contain the scopes that
precede each '::' and keep track of whether the global scoping
operator '::' was at the beginning. For example, we need to keep track
of the leading '::', 'foo', and 'bar' in

  ::foo::bar::x

The Action's CXXScopeTy * is no longer a DeclContext *. It's now the
opaque version of the new NestedNameSpecifier, which contains a single
component of a nested-name-specifier (either a DeclContext * or a Type
*, bitmangled).

The new sugar type QualifiedNameType composes a sequence of
NestedNameSpecifiers with a representation of the type we're actually
referring to. At present, we only build QualifiedNameType nodes within
Sema::getTypeName. This will be extended to other type-constructing
actions (e.g., ActOnClassTemplateId).

Also on the way: QualifiedDeclRefExprs will also store a sequence of
NestedNameSpecifiers, so that we can print out the property
nested-name-specifier. I expect to also use this for handling
dependent names like Fibonacci<I - 1>::value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67265 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR 3836 by eagerly assuming symbolic constraints returned by unary '!'.
Ted Kremenek [Wed, 18 Mar 2009 23:49:26 +0000 (23:49 +0000)]
Fix PR 3836 by eagerly assuming symbolic constraints returned by unary '!'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67260 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse the instantiated expressions to build the ConditionalOperator. This addresses...
Gabor Greif [Wed, 18 Mar 2009 23:47:39 +0000 (23:47 +0000)]
Use the instantiated expressions to build the ConditionalOperator. This addresses the second part of review feedback.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67259 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a sugared version of ASTOwningResult::take,
Gabor Greif [Wed, 18 Mar 2009 23:44:22 +0000 (23:44 +0000)]
Add a sugared version of ASTOwningResult::take,
that does a downcast. It is named takeAs<T>().
The plain-pointer version is also added, but
that side seems to be seriously bitrotten.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67258 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Fix bug in translating -O to clang, add clang-translation test
Daniel Dunbar [Wed, 18 Mar 2009 23:39:35 +0000 (23:39 +0000)]
Driver: Fix bug in translating -O to clang, add clang-translation test
case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67257 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Resolve program path for "cp" (used as part of transparent gcc
Daniel Dunbar [Wed, 18 Mar 2009 23:34:15 +0000 (23:34 +0000)]
Driver: Resolve program path for "cp" (used as part of transparent gcc
PCH support).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67256 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Forcibly disable pipe support until we can execute them, the
Daniel Dunbar [Wed, 18 Mar 2009 23:18:19 +0000 (23:18 +0000)]
Driver: Forcibly disable pipe support until we can execute them, the
driver is functional without them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67254 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Delete the temporary files llvm::sys::Path::makeUnique
Daniel Dunbar [Wed, 18 Mar 2009 23:08:52 +0000 (23:08 +0000)]
Driver: Delete the temporary files llvm::sys::Path::makeUnique
sometimes leaves around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67253 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake -j8 safe.
Mike Stump [Wed, 18 Mar 2009 22:53:10 +0000 (22:53 +0000)]
Make -j8 safe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67252 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd simple test case to make sure driver can generate executables.
Daniel Dunbar [Wed, 18 Mar 2009 22:49:41 +0000 (22:49 +0000)]
Add simple test case to make sure driver can generate executables.
 - Hopefully Chris can pardon one executable test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Execute jobs; no pipe support yet.
Daniel Dunbar [Wed, 18 Mar 2009 22:44:24 +0000 (22:44 +0000)]
Driver: Execute jobs; no pipe support yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67250 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoobjc: Implemented variables declared in class interface
Fariborz Jahanian [Wed, 18 Mar 2009 22:33:24 +0000 (22:33 +0000)]
objc: Implemented variables declared in class interface
whose sema decl is at the translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67249 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Cleanup temporary/result files.
Daniel Dunbar [Wed, 18 Mar 2009 22:16:03 +0000 (22:16 +0000)]
Driver: Cleanup temporary/result files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67248 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix crash reported in <rdar://problem/6695527>. We now have
Ted Kremenek [Wed, 18 Mar 2009 22:10:22 +0000 (22:10 +0000)]
Fix crash reported in <rdar://problem/6695527>. We now have
SVal::GetRValueSymbolVal do the checking if we can symbolicate a type instead of
having BasicStoreManager do it (which wasn't always doing the check
consistently). Having this check in SVal::GetRValueSymbolVal keeps the check in
one centralized place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67245 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Lookup program names using llvm::sys::Program::FindProgramByName
Daniel Dunbar [Wed, 18 Mar 2009 21:34:08 +0000 (21:34 +0000)]
Driver: Lookup program names using llvm::sys::Program::FindProgramByName
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.

Also, have GCC tools lookup gcc program path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67243 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe eventual name of this will be clang, might as well start now.
Mike Stump [Wed, 18 Mar 2009 21:19:11 +0000 (21:19 +0000)]
The eventual name of this will be clang, might as well start now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67241 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Update test case.
Daniel Dunbar [Wed, 18 Mar 2009 21:17:39 +0000 (21:17 +0000)]
Driver: Update test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67240 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd stub TableGen file for diagnostic options.
Ted Kremenek [Wed, 18 Mar 2009 21:13:53 +0000 (21:13 +0000)]
Add stub TableGen file for diagnostic options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosilence some errors that should not apply to .S files on code like:
Chris Lattner [Wed, 18 Mar 2009 21:10:12 +0000 (21:10 +0000)]
silence some errors that should not apply to .S files on code like:

''
   '
 '

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67237 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowhen preprocessing a .S file, unknown directives should just be passed through,
Chris Lattner [Wed, 18 Mar 2009 21:00:25 +0000 (21:00 +0000)]
when preprocessing a .S file, unknown directives should just be passed through,
and the token after the # should be expanded if it is not a valid directive.
This allows us to transform things like:

#define FOO BAR
# FOO

into # BAR, even though FOO is not normally expanded for directives.

This should fix PR3833

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoproperly form a full token for # before calling HandleDirective.
Chris Lattner [Wed, 18 Mar 2009 20:58:27 +0000 (20:58 +0000)]
properly form a full token for # before calling HandleDirective.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67235 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis is not considered a preprocessor directive in .S files:
Chris Lattner [Wed, 18 Mar 2009 20:41:10 +0000 (20:41 +0000)]
This is not considered a preprocessor directive in .S files:
# 4

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67233 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoconstructs like:
Chris Lattner [Wed, 18 Mar 2009 20:31:57 +0000 (20:31 +0000)]
constructs like:
#define Y X ## .
Y

are ok in .S files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67231 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadded type dependent testcase
Gabor Greif [Wed, 18 Mar 2009 20:26:44 +0000 (20:26 +0000)]
added type dependent testcase

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67230 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Support ToolChain specific path lists to search for files and
Daniel Dunbar [Wed, 18 Mar 2009 20:26:19 +0000 (20:26 +0000)]
Driver: Support ToolChain specific path lists to search for files and
programs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67229 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Get executable path using llvm::sys::Path::GetMainExecutable.
Daniel Dunbar [Wed, 18 Mar 2009 20:25:53 +0000 (20:25 +0000)]
Driver: Get executable path using llvm::sys::Path::GetMainExecutable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67228 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd version information to ISO style test results.
Mike Stump [Wed, 18 Mar 2009 20:25:18 +0000 (20:25 +0000)]
Add version information to ISO style test results.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67227 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoincorporate review comment (about the optimization when we have a non-typedependent...
Gabor Greif [Wed, 18 Mar 2009 20:12:58 +0000 (20:12 +0000)]
incorporate review comment (about the optimization when we have a non-typedependent expression)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67226 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove generated file to ObjDir.
Mike Stump [Wed, 18 Mar 2009 20:12:50 +0000 (20:12 +0000)]
Move generated file to ObjDir.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67225 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR3835: Interaction with ABI structure passing can inhibit
Daniel Dunbar [Wed, 18 Mar 2009 19:51:01 +0000 (19:51 +0000)]
PR3835: Interaction with ABI structure passing can inhibit
readnone/readonly attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67224 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Construct temporary file names.
Daniel Dunbar [Wed, 18 Mar 2009 19:34:39 +0000 (19:34 +0000)]
Driver: Construct temporary file names.
 - This is still suboptimal, but should at least be workable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67223 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHTML rewriter: Don't replace tabs with spaces by default.
Ted Kremenek [Wed, 18 Mar 2009 18:47:46 +0000 (18:47 +0000)]
HTML rewriter: Don't replace tabs with spaces by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67221 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd revision information.
Mike Stump [Wed, 18 Mar 2009 18:45:55 +0000 (18:45 +0000)]
Add revision information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67220 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix the more complex cases by actually codegen'ing the right expr :)
Chris Lattner [Wed, 18 Mar 2009 18:30:44 +0000 (18:30 +0000)]
fix the more complex cases by actually codegen'ing the right expr :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67219 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd codegen support for casting an element to a union.
Chris Lattner [Wed, 18 Mar 2009 18:28:57 +0000 (18:28 +0000)]
add codegen support for casting an element to a union.
There are some more complex cases (_Complex and structs)
that I'm still working on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67218 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Don't warn about unused arguments if there are Driver errors
Daniel Dunbar [Wed, 18 Mar 2009 18:03:46 +0000 (18:03 +0000)]
Driver: Don't warn about unused arguments if there are Driver errors
(brings code in line with diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67217 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify logic, isInvalid check is redundant
Gabor Greif [Wed, 18 Mar 2009 17:53:25 +0000 (17:53 +0000)]
simplify logic, isInvalid check is redundant

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67216 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBe sure to not add weak import, if we are ignoring it.
Mike Stump [Wed, 18 Mar 2009 17:39:31 +0000 (17:39 +0000)]
Be sure to not add weak import, if we are ignoring it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67214 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove two xfailed tests. These aren't doing any good for us until serialization...
Chris Lattner [Wed, 18 Mar 2009 17:16:30 +0000 (17:16 +0000)]
remove two xfailed tests.  These aren't doing any good for us until serialization is revisited.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67213 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRefactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass
Ted Kremenek [Wed, 18 Mar 2009 16:00:17 +0000 (16:00 +0000)]
Refactor 'Warning', 'Extension', and 'ExtWarn' TableGen classes to subclass
'DiagnosticControlled'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67209 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd codegen support for aggregate BlockDeclRefExprs.
Mike Stump [Wed, 18 Mar 2009 15:54:29 +0000 (15:54 +0000)]
Add codegen support for aggregate BlockDeclRefExprs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67207 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix URL trimming for version information.
Mike Stump [Wed, 18 Mar 2009 15:19:35 +0000 (15:19 +0000)]
Fix URL trimming for version information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67206 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIgnore weak import on properties.
Mike Stump [Wed, 18 Mar 2009 15:05:17 +0000 (15:05 +0000)]
Ignore weak import on properties.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67205 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove version number.
Mike Stump [Wed, 18 Mar 2009 14:00:02 +0000 (14:00 +0000)]
Improve version number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67204 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Port Clang argument translation.
Daniel Dunbar [Wed, 18 Mar 2009 10:01:51 +0000 (10:01 +0000)]
Driver: Port Clang argument translation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Bug fix, derived .gch names sometimes started with "/".
Daniel Dunbar [Wed, 18 Mar 2009 09:58:30 +0000 (09:58 +0000)]
Driver: Bug fix, derived .gch names sometimes started with "/".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoccc: Pass --relocation-model as separate arguments (to match Driver).
Daniel Dunbar [Wed, 18 Mar 2009 09:36:19 +0000 (09:36 +0000)]
ccc: Pass --relocation-model as separate arguments (to match Driver).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67190 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add argument translation utilities to ArgList.
Daniel Dunbar [Wed, 18 Mar 2009 09:29:36 +0000 (09:29 +0000)]
Driver: Add argument translation utilities to ArgList.
 - Support things like telling which -ffoo -fno-foo option won, and
   forwarding all arguments matching a certain set of options to the
   tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67189 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Lift out common GCC tool and implement generic GCC tool
Daniel Dunbar [Wed, 18 Mar 2009 08:07:30 +0000 (08:07 +0000)]
Driver: Lift out common GCC tool and implement generic GCC tool
argument translation.

Also, stub out clang tool implementation a bit more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67185 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Forgot to mark -### as a driver option.
Daniel Dunbar [Wed, 18 Mar 2009 08:03:24 +0000 (08:03 +0000)]
Driver: Forgot to mark -### as a driver option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67184 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add assert and FIXME; arguments which act as linker inputs
Daniel Dunbar [Wed, 18 Mar 2009 08:02:40 +0000 (08:02 +0000)]
Driver: Add assert and FIXME; arguments which act as linker inputs
(e.g., -filelist) are currently broken.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67183 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Provide Arg::render implementations.
Daniel Dunbar [Wed, 18 Mar 2009 08:01:48 +0000 (08:01 +0000)]
Driver: Provide Arg::render implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67182 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add "d" flag to Options.def for options which are completely
Daniel Dunbar [Wed, 18 Mar 2009 08:01:15 +0000 (08:01 +0000)]
Driver: Add "d" flag to Options.def for options which are completely
handled by driver.
 - This is not very precise, we use it to drive the "forward-to-gcc"
   predicate, when trying to talk to a generic gcc tool.

 - Slightly better than what ccc was doing, and should be good
   enough. Platforms which want a robust driver should implement a
   proper tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67181 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: ConstructJob also needs to know the destination (where to put
Daniel Dunbar [Wed, 18 Mar 2009 07:06:02 +0000 (07:06 +0000)]
Driver: ConstructJob also needs to know the destination (where to put
its commands).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Print version on stderr to match [gc]cc.
Daniel Dunbar [Wed, 18 Mar 2009 06:51:03 +0000 (06:51 +0000)]
Driver: Print version on stderr to match [gc]cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67178 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Implement -### (hard to tell, since we don't actually
Daniel Dunbar [Wed, 18 Mar 2009 06:49:39 +0000 (06:49 +0000)]
Driver: Implement -### (hard to tell, since we don't actually
construct any jobs).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67177 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add forwarding methods to underlying list for PipedJob and
Daniel Dunbar [Wed, 18 Mar 2009 06:48:39 +0000 (06:48 +0000)]
Driver: Add forwarding methods to underlying list for PipedJob and
JobList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67176 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Claim inputs when we bind the InputAction.
Daniel Dunbar [Wed, 18 Mar 2009 06:21:12 +0000 (06:21 +0000)]
Driver: Claim inputs when we bind the InputAction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67174 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Make Arg::Claimed mutable.
Daniel Dunbar [Wed, 18 Mar 2009 06:20:32 +0000 (06:20 +0000)]
Driver: Make Arg::Claimed mutable.
 - This is unfortunate but necessary to retain any utility for const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67173 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Rename Command::Argv to Command::Arguments to make it clearer
Daniel Dunbar [Wed, 18 Mar 2009 06:13:37 +0000 (06:13 +0000)]
Driver: Rename Command::Argv to Command::Arguments to make it clearer
that this does not include the implicit first argument (the executable
name).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67172 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Don't claim inputs when pipelining, a tool should eventually
Daniel Dunbar [Wed, 18 Mar 2009 06:09:38 +0000 (06:09 +0000)]
Driver: Don't claim inputs when pipelining, a tool should eventually
claim these.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67171 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add a dash of const.
Daniel Dunbar [Wed, 18 Mar 2009 06:07:59 +0000 (06:07 +0000)]
Driver: Add a dash of const.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67170 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Stub out Tool::ConstructJob.
Daniel Dunbar [Wed, 18 Mar 2009 06:00:36 +0000 (06:00 +0000)]
Driver: Stub out Tool::ConstructJob.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd 'make cscope.files' top level target.
Daniel Dunbar [Wed, 18 Mar 2009 05:59:14 +0000 (05:59 +0000)]
Add 'make cscope.files' top level target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67168 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Fix Compilation::getArgsForToolChain, local variable was
Daniel Dunbar [Wed, 18 Mar 2009 05:58:45 +0000 (05:58 +0000)]
Driver: Fix Compilation::getArgsForToolChain, local variable was
shadowing member.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67167 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Add two normalizations for powerpc.
Daniel Dunbar [Wed, 18 Mar 2009 04:41:46 +0000 (04:41 +0000)]
Driver: Add two normalizations for powerpc.
 - PR3830

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67166 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix PR3809, codegen for inc/dec of function pointers.
Chris Lattner [Wed, 18 Mar 2009 04:25:13 +0000 (04:25 +0000)]
fix PR3809, codegen for inc/dec of function pointers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67165 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoteach codegen to handle noop casts as lvalues.
Chris Lattner [Wed, 18 Mar 2009 04:02:57 +0000 (04:02 +0000)]
teach codegen to handle noop casts as lvalues.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67164 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix -E mismatch; an identifier followed by a numeric constant does not
Daniel Dunbar [Wed, 18 Mar 2009 03:32:24 +0000 (03:32 +0000)]
Fix -E mismatch; an identifier followed by a numeric constant does not
require a space (to avoid concatenation) if the numeric constant had a
leading period.
 - PR3819.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67163 91177308-0d34-0410-b5e6-96231b3b80d8