Commit Graph

53204 Commits

Author SHA1 Message Date
Fariborz Jahanian 9e3ad5220d This patch builds the meta-class object for each
implemented class in objc2's nonfrigile abi.

llvm-svn: 62929
2009-01-24 20:21:50 +00:00
Chris Lattner 8dff017695 Fix PR3386 by handling GCC's rules for alignof, which are substantially
different than those for sizeof.  Reject alignof(bitfield) like gcc does.

llvm-svn: 62928
2009-01-24 20:17:12 +00:00
Chris Lattner 619393762b fix a fixme, don't leak the expr on error.
llvm-svn: 62927
2009-01-24 19:49:13 +00:00
Chris Lattner b1355b1545 minor formatting changes, no functionality change.
llvm-svn: 62926
2009-01-24 19:46:37 +00:00
Torok Edwin 3cedd4dc64 add note about possible GEP improvement with fields of size 0.
llvm-svn: 62925
2009-01-24 19:30:25 +00:00
Daniel Dunbar 134a02586e Fix invalid evaluation of _Complex float (real & imaginary parts had
mismatched semantics).
 - Enforce this in APValue.

llvm-svn: 62924
2009-01-24 19:08:01 +00:00
Anders Carlsson a0b892113a Handle the 'e' constraint. Fixes PR3385
llvm-svn: 62923
2009-01-24 18:03:09 +00:00
Anders Carlsson b66a312f93 Ignore parens when determining if an expr is a string literal. Fixes PR3382.
llvm-svn: 62922
2009-01-24 17:47:50 +00:00
Dan Gohman 73fd5a5651 Add a PR comment to this test.
llvm-svn: 62921
2009-01-24 17:32:54 +00:00
Torok Edwin f4395ea97a testcase for PR3381.
Also it was an empty struct, not a void after all.

llvm-svn: 62920
2009-01-24 17:16:04 +00:00
Dan Gohman 142ccc0e15 Add more documentation mentioning the limitations due to PR2660.
llvm-svn: 62919
2009-01-24 15:58:40 +00:00
Torok Edwin 73ff92272f void* is represented as pointer to empty struct {}.
Thus we need to check whether the struct is empty before trying to index into
it. This fixes PR3381.

llvm-svn: 62918
2009-01-24 11:30:49 +00:00
Owen Anderson ee34b8f179 Some cleanups. No functional changes.
llvm-svn: 62917
2009-01-24 10:07:43 +00:00
Daniel Dunbar ed4361ecbb Add simple make based harness for running ABI tests.
llvm-svn: 62916
2009-01-24 08:43:22 +00:00
Daniel Dunbar 3334a44501 Start filling in x86_64 ABI implementation.
- No functionality change, moved behind -use-x86_64-abi option until
   it becomes non-experimental.

llvm-svn: 62915
2009-01-24 08:32:22 +00:00
Ted Kremenek b239341ec4 Updated checker build.
llvm-svn: 62914
2009-01-24 08:11:59 +00:00
Ted Kremenek b3fcaa7a77 Fix crash ElementRegion::getRValueType() when the RvalueType of the ArrayRegion is a typedef and not (directly) a pointer.
llvm-svn: 62909
2009-01-24 06:11:36 +00:00
Dale Johannesen 899ecdbbba Improve the inlining cost function a bit.
Little practical effect.

llvm-svn: 62908
2009-01-24 01:27:33 +00:00
Chris Lattner 72cd68fe64 Make InstCombineStoreToCast handle aggregates more aggressively,
handling the case in Transforms/InstCombine/cast-store-gep.ll, which
is a heavily reduced testcase from Clang on x86-64.

llvm-svn: 62904
2009-01-24 01:00:13 +00:00
Ted Kremenek f08ac278ed More hacking on static analyzer diagnostics. When emitting summary diagnostics the code paths for diagnostics involving paths or single locations are now unified. This patch also constifies many arguments/methods that are touched by this logic, leading to a nice overall code cleanup.
llvm-svn: 62903
2009-01-24 00:55:43 +00:00
Mike Stump 82221d62a9 Perform optional clang building.
llvm-svn: 62895
2009-01-24 00:00:41 +00:00
Fariborz Jahanian 71394045e4 Some very early work for new objc's
meta-data generation.

llvm-svn: 62894
2009-01-23 23:53:38 +00:00
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