Commit Graph

52982 Commits

Author SHA1 Message Date
Evan Cheng 6d8970695b Refactor code. No functionality change.
llvm-svn: 62893
2009-01-23 23:27:33 +00:00
Devang Patel ccfacfff9a Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, DW_AT_APPLE_flags.
DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way.

DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by  a project, irrespective of whether the project used makefile, Xcode or something else.

llvm-gcc patch is next.

llvm-svn: 62888
2009-01-23 22:33:47 +00:00
Chris Lattner 832959536a hopefully address PR3379 by making the P modifier work in x86 inline asm.
llvm-svn: 62887
2009-01-23 22:33:40 +00:00
Douglas Gregor 18d30c2342 Fix a small regression in warning about template type parameter redeclarations.
llvm-svn: 62886
2009-01-23 22:28:29 +00:00
Ted Kremenek 864ead2076 Output summary diagnostic for each bug report.
llvm-svn: 62885
2009-01-23 22:22:49 +00:00
Douglas Gregor 7a95b08fce More APSInt appeasement
llvm-svn: 62884
2009-01-23 22:22:29 +00:00
Devang Patel 486d309b34 Fix test case. Use valid file name and directory in global variable's debug info entry.
llvm-svn: 62883
2009-01-23 21:54:18 +00:00
Douglas Gregor b6b9961fdd Make sure that all NamedDecls have an identifier namespace.
Make sure that we know a call is invalid if we dropped arguments.

llvm-svn: 62882
2009-01-23 21:30:56 +00:00
Gabor Greif 59c431347f use CallSite::isCalle instead of slow getOperandNo
llvm-svn: 62877
2009-01-23 21:17:04 +00:00
Douglas Gregor 51650d380b Hopefully the last of the APSInt signedness issues with initializers. Fixes PR clang/3378
llvm-svn: 62876
2009-01-23 21:04:18 +00:00
Ted Kremenek ec28391084 Added clang option '--analyzer-display-progress' to indicate that the analyzer should output 'ANALYZE:' messages to display its progress on a source file.
llvm-svn: 62875
2009-01-23 20:52:26 +00:00
Ted Kremenek ea06ec1cad Added virtual method DiagnosticClient::IncludeInDiagnosticCounts(). This is used by Diagnostics to determine if a diagnostic sent to a given DiagnosticClient should be included in the count of diagnostics. The default implementation of this method returns 'true'.
Implemented DiagCollector::IncludeInDiagnosticCounts() to return 'false' so that the batching of diagnostics for use with BugReporter doesn't mess up the count of real diagnostics.

llvm-svn: 62873
2009-01-23 20:28:53 +00:00
Daniel Dunbar 3d5d14ea15 ccc: Finish definition of long argument translations.
- However, these last ones do not actually work; the issue is that
   they translate to batches of options and need to be reparsed. For
   now we just give an unsupported error on them.

llvm-svn: 62872
2009-01-23 20:08:16 +00:00
Ted Kremenek 099243aa9e When using -analyzer-output-plist always output a plist file even if it contains no error reports.
llvm-svn: 62871
2009-01-23 20:06:20 +00:00
Daniel Dunbar 505f751451 ccc: Another batch of long argument translations.
- Again turned up a few which don't do anything sensible.

llvm-svn: 62870
2009-01-23 19:40:54 +00:00
Gabor Greif eb61fcf2a1 Simplify the logic of getting hold of a PHI predecessor block.
There is now a direct way from value-use-iterator to incoming block in PHINode's API.
This way we avoid the iterator->index->iterator trip, and especially the costly
getOperandNo() invocation. Additionally there is now an assertion that the iterator
really refers to one of the PHI's Uses.

llvm-svn: 62869
2009-01-23 19:40:15 +00:00
Nate Begeman 617001d842 Add support for deleting a module provider from a JIT in such a way that it does not cause the owned module to be fully materialized.
llvm-svn: 62864
2009-01-23 19:27:28 +00:00
Devang Patel dd7aa37895 Empty DIType represents void. In this case no need to construct any type DIE.
llvm-svn: 62861
2009-01-23 19:13:31 +00:00
Dan Gohman 1275e28ded Fold x-0 to x in unsafe-fp-math mode. This comes up in the
testcase from PR3376, and in fact is sufficient to completely
avoid the problem in that testcase.

There's an underlying problem though; TLI.isOperationLegal
considers Custom to be Legal, which might be ok in some
cases, but that's what DAGCombiner is using in many places
to test if something is legal when LegalOperations is true.
When DAGCombiner is running after legalize, this isn't
sufficient. I'll address this in a separate commit.

llvm-svn: 62860
2009-01-23 19:10:37 +00:00
Douglas Gregor 5da47ad57b Allow subtraction of function pointer types in C, as a GNU extension. Fixes rdar://problem/6520707
llvm-svn: 62859
2009-01-23 19:03:35 +00:00
Douglas Gregor 583cf0ac57 Make sure all of the isUnsigned flags line up when comparing initializer values, to really really fix PR clang/3377
llvm-svn: 62858
2009-01-23 18:58:42 +00:00
Daniel Dunbar 42a8cd37b2 Handle pointer arithmetic on function pointers.
- <rdar://problem/6518844> Clang-generated bitcode crashes LLVM while compiling function pointer addition expression

llvm-svn: 62857
2009-01-23 18:51:09 +00:00
Chris Lattner 1f6c7fe6a8 This is a follow-up to r62675:
Refactor how the preprocessor changes a token from being an tok::identifier to a 
keyword (e.g. tok::kw_for).  Instead of doing this in HandleIdentifier, hoist this
common case out into the caller, so that every keyword doesn't have to go through
HandleIdentifier.  This drops time in HandleIdentifier from 1.25ms to .62ms, and
speeds up clang -Eonly with PTH by about 1%.

llvm-svn: 62855
2009-01-23 18:35:48 +00:00
Chris Lattner 9db60a38e9 Preprocessor doesn't require and IdentifierInfoLookup object.
Patch by Axel Naumann!

llvm-svn: 62854
2009-01-23 18:00:48 +00:00
Fariborz Jahanian 7fa50496f6 Checked in an oops!
llvm-svn: 62853
2009-01-23 17:48:29 +00:00
Fariborz Jahanian 5a63e4cd53 Another missing LLVM type for objc2's new abi defined.
llvm-svn: 62852
2009-01-23 17:41:22 +00:00
Douglas Gregor 033d1257ca Properly manage the bit-widths of APInts/APSInts in array initialization.
Fixes PR clang/3377

llvm-svn: 62851
2009-01-23 16:54:12 +00:00
Douglas Gregor 9aa8904a46 Handle any undeclared parameters in a K&R-style function with a
special action, inside function prototype scope. This avoids confusion
when we try to inject these parameters into the scope of the function
body before the function itself has been added to the surrounding
scope. Fixes <rdar://problem/6097326>.

llvm-svn: 62849
2009-01-23 16:23:13 +00:00
Zhongxing Xu e37f9afb2e Implement retrieval of the default value of element and field regions.
llvm-svn: 62847
2009-01-23 11:22:12 +00:00
Zhongxing Xu 804f26a60a Now this comment should be resolved. See the comments for the KillSet.
llvm-svn: 62846
2009-01-23 10:42:17 +00:00
Zhongxing Xu b8365bd890 Add a test case for init expr of array and struct type.
llvm-svn: 62845
2009-01-23 10:23:13 +00:00
Zhongxing Xu 570e088e4b When getting the element region type, we should get the rvalue type of the super
region. Otherwise we would get an extra level of pointer type.

llvm-svn: 62844
2009-01-23 10:19:29 +00:00
Duncan Sands d4aae43e79 Patch to build llvm with srcdir != objdir from
llvm-top.  By Michael Schuerig, with some small
tweaks to make the "don't configure if already
configured" logic work.

llvm-svn: 62842
2009-01-23 08:42:38 +00:00
Daniel Dunbar 8fb96605f8 ccc: Implement long options which take joined & separate forms.
llvm-svn: 62841
2009-01-23 08:16:41 +00:00
Chris Lattner 3f4591c89f fix two more cases where we could let the NLPDI cache get unsorted.
With this, sqlite3 now passes.

llvm-svn: 62839
2009-01-23 07:12:16 +00:00
Chris Lattner e3ea48c71e Unconditionally reset 'cache' to zero, even if we don't need to resort it.
This avoids using a dangling pointer.

Reset NumSortedEntries after restoring Cache to avoid extraneous sorts.
This fixes the reduced sqlite3 testcase, but apparently not the whole app.

llvm-svn: 62838
2009-01-23 06:48:41 +00:00
Evan Cheng 9db227999a Only check if coalescing is worthwhile when the result is targeting a more restrictive register class.
llvm-svn: 62837
2009-01-23 05:48:59 +00:00
Evan Cheng f347c3615b Update test to reflect command line option name change.
llvm-svn: 62836
2009-01-23 05:45:31 +00:00
Owen Anderson a2ca64a39a Stage two of fixing pre-alloc-splitting's code size issues: filter out restores that are just
going to be re-spilled again.

This also helps performance.  Pre-alloc-splitting now seems to be an overall win on SPEC.

llvm-svn: 62834
2009-01-23 03:28:53 +00:00
Evan Cheng ab7bf14fb4 Cross register class coalescing. Not yet enabled.
llvm-svn: 62832
2009-01-23 02:15:19 +00:00
Daniel Dunbar 8fa972a55b ccc: Support long ('--...') flag arguments.
- Curiously, a number of the current translations gcc does appear to
   be useless?

llvm-svn: 62831
2009-01-23 02:00:46 +00:00
Fariborz Jahanian 0232c0569f Define LLVM types for nonfragile abi metadata.
llvm-svn: 62830
2009-01-23 01:46:23 +00:00
Daniel Dunbar e2c430b317 ccc: Organize long options together.
llvm-svn: 62829
2009-01-23 01:31:44 +00:00
Devang Patel 7d537c23c1 Code did not follow associated comment. not a good idea.
llvm-svn: 62828
2009-01-23 01:25:58 +00:00
Devang Patel 4c8f55abda Set appropriate tag for the composite type.
llvm-svn: 62827
2009-01-23 01:19:09 +00:00
Douglas Gregor a248034f41 Make -ast-dump print Objective-C method declarations (and other
Objective-C declarations!) again. Fixes <rdar://problem/6517155>

llvm-svn: 62826
2009-01-23 01:10:18 +00:00
Daniel Dunbar eff67fa33b ccc: Add support for several more aliases (--ansi, --assemble,
--assert, --classpath).
 - Requires providing some option parameters to over-ride rendering in
   order to match gcc. There may be a cleaner way to do this (probably
   by introducing a new option type for long JoinedOrSeparate forms).

llvm-svn: 62825
2009-01-23 00:54:03 +00:00
Daniel Dunbar 58645d0285 ccc: Darwin/x86/link: Fix a few incompatibilities with gcc (missed
forwarding -s to linker, and was only taking last arg in some cases
when should have been taking all).

llvm-svn: 62824
2009-01-23 00:39:52 +00:00
Douglas Gregor f6cd928bf4 Support arithmetic on pointer-to-function types as a GNU
extension. Addresses clang PR/3371.

llvm-svn: 62823
2009-01-23 00:36:41 +00:00
Chris Lattner 706d40e662 a minor tweak to my previous patch, handle the invalidation case
when there are multiple iterations of the loop.  This fixes PR3375.

llvm-svn: 62822
2009-01-23 00:27:03 +00:00