Commit Graph

62101 Commits

Author SHA1 Message Date
Fariborz Jahanian 9fa077c626 Patch to allocate list of bases in CXXRecordDecl
using ASTContxt allocation.

llvm-svn: 74717
2009-07-02 18:26:15 +00:00
Ted Kremenek df67d426d9 StoreManagers: Use 'hasGlobalsStorage()' and 'hasParametersStorage()' instead of
directly consulting if a VarDecl is an implicit or actual parameter, a global,
etc.

llvm-svn: 74716
2009-07-02 18:25:09 +00:00
Ted Kremenek 7e4a9a02c3 Add a separate MemSpaceRegion for function/method arguments passed on the stack.
This will simplify the logic of StoreManagers that want to specially reason
about the values of parameters.

llvm-svn: 74715
2009-07-02 18:14:59 +00:00
Owen Anderson 0a2c458ae0 Add an accessor to Function so that Passes can easily get access to the context.
llvm-svn: 74714
2009-07-02 18:03:58 +00:00
Sanjiv Gupta 6c41ac5b38 Prefix bin dir to executables.
llvm-svn: 74713
2009-07-02 17:51:09 +00:00
Devang Patel 676efa092c Remove tabs.
llvm-svn: 74712
2009-07-02 17:39:40 +00:00
Sanjiv Gupta 2b65d1aac1 Fixed handling of -c option.wq
llvm-svn: 74711
2009-07-02 17:35:38 +00:00
Owen Anderson ac7334c1cf Use LLVMContext for generating MDStrings too.
llvm-svn: 74710
2009-07-02 17:28:30 +00:00
Ted Kremenek df15d29f17 Remove commented methods. Add MemRegion::printStdErr().
llvm-svn: 74709
2009-07-02 17:24:10 +00:00
Owen Anderson 29ec3e0e50 Use LLVMContext to generate metadata constants.
llvm-svn: 74708
2009-07-02 17:20:28 +00:00
Owen Anderson fea7ae88c9 Add accessors for metadata constants.
llvm-svn: 74707
2009-07-02 17:19:47 +00:00
Devang Patel 526b17097a Fix typo.
Thanks Duncan!

llvm-svn: 74706
2009-07-02 17:17:03 +00:00
Owen Anderson e792c90fd1 Add accessor for MDNode.
llvm-svn: 74705
2009-07-02 17:12:48 +00:00
Douglas Gregor c6d5edd2ed Add support for retrieving the Doxygen comment associated with a given
declaration in the AST. 

The new ASTContext::getCommentForDecl function searches for a comment
that is attached to the given declaration, and returns that comment, 
which may be composed of several comment blocks.

Comments are always available in an AST. However, to avoid harming
performance, we don't actually parse the comments. Rather, we keep the
source ranges of all of the comments within a large, sorted vector,
then lazily extract comments via a binary search in that vector only
when needed (which never occurs in a "normal" compile).

Comments are written to a precompiled header/AST file as a blob of
source ranges. That blob is only lazily loaded when one requests a
comment for a declaration (this never occurs in a "normal" compile). 

The indexer testbed now supports comment extraction. When the
-point-at location points to a declaration with a Doxygen-style
comment, the indexer testbed prints the associated comment
block(s). See test/Index/comments.c for an example.

Some notes:
  - We don't actually attempt to parse the comment blocks themselves,
  beyond identifying them as Doxygen comment blocks to associate them
  with a declaration.
  - We won't find comment blocks that aren't adjacent to the
  declaration, because we start our search based on the location of
  the declaration.
  - We don't go through the necessary hops to find, for example,
  whether some redeclaration of a declaration has comments when our
  current declaration does not. Similarly, we don't attempt to
  associate a \param Foo marker in a function body comment with the
  parameter named Foo (although that is certainly possible).
  - Verification of my "no performance impact" claims is still "to be
  done".

llvm-svn: 74704
2009-07-02 17:08:52 +00:00
Owen Anderson 09063cec4e Use LLVMContext for generating UndefValue constants too!
llvm-svn: 74703
2009-07-02 17:04:01 +00:00
Owen Anderson f85afb2591 Add accessor for getting UndefValue's.
llvm-svn: 74702
2009-07-02 16:51:51 +00:00
Owen Anderson 6b92174dda Describe the LLVMContext API change.
llvm-svn: 74701
2009-07-02 16:48:38 +00:00
Chris Lattner ccfb5105eb simplify some logic by using isWeakForLinker(). Thanks to Anton for
pointing this out.

llvm-svn: 74700
2009-07-02 16:08:53 +00:00
Chris Lattner edb8407f0c do not try to analyze bitcasts from i64 to <2 x i32> in ComputedMaskedBits. While
we could do this, doing so requires adjusting the demanded mask and the code isn't 
doing that yet.  This fixes PR4495

llvm-svn: 74699
2009-07-02 16:04:08 +00:00
Chris Lattner f3f6aaa2c3 fix inverted logic pointed out by John McCall, noticed by inspection.
This was considering vector intrinsics to have cost 2, but non-vector
intrinsics to have cost 1, which is backward.

llvm-svn: 74698
2009-07-02 15:39:39 +00:00
Duncan Sands f9cf4ffcc7 Fix windows build, patch by Howard Su.
llvm-svn: 74697
2009-07-02 12:09:50 +00:00
Evan Cheng 84c6cda2ef Thumb2 pre/post indexed loads.
llvm-svn: 74696
2009-07-02 07:28:31 +00:00
Owen Anderson 2de0067e60 Ack, missed one incompatibility.
llvm-svn: 74695
2009-07-02 07:21:49 +00:00
Owen Anderson 31d44e4904 Restore other bits of the C API that I tore up. All pre-existing APIs default to using the
default global context, while new *InContext() APIs have been added that take a LLVMContextRef parameter.

Apologies to anyone affected by this breakage.

llvm-svn: 74694
2009-07-02 07:17:57 +00:00
Evan Cheng 844f0b4562 80 col violation.
llvm-svn: 74693
2009-07-02 06:44:30 +00:00
Evan Cheng 2c450d35ae Change the meaning of predicate hasThumb2 to mean thumb2 ISA is available, not that it's in thumb mode and thumb2 is available. Added isThumb2 predicate to replace the old predicate.
llvm-svn: 74692
2009-07-02 06:38:40 +00:00
Chris Lattner 87bb642676 @GOTPCREL is also rip-relative. Fix fast-isel to do the right thing.
This fixes an llvm-gcc bootstrap problem I introduced.

llvm-svn: 74691
2009-07-02 04:22:01 +00:00
Chris Lattner d1c5951615 Fix yet-another bug I introduced into fastisel, this time handling
constant pool references that weren't getting properly rip-relative.

llvm-svn: 74689
2009-07-02 03:14:25 +00:00
Daniel Dunbar a065149f39 llvm-mc/x86: Test case for x86 operand parsing.
llvm-svn: 74688
2009-07-02 02:28:23 +00:00
Daniel Dunbar 0224b65f0a llvm-mc/x86: Fix various nit-picky bugs in displacement parsing.
- Test case to follow.

llvm-svn: 74687
2009-07-02 02:26:39 +00:00
Bruno Cardoso Lopes eefbf1961c Remove getFunctionAlignment from TargetELFInfo and use new MachineFunction alignment method
llvm-svn: 74686
2009-07-02 02:13:13 +00:00
Daniel Dunbar 9bff6531fd llvm-mc/x86: Fix bug in disambiguation of displacement operand, introduced by me
(I think).
 - We weren't properly parsing the leading parenthesized expression in something
   like 'push (4)(%eax)'.
 
 - Added ParseParenRelocatableExpression to support this. I suspect we should
   just use lookahead, though.

 - Test case to follow.

llvm-svn: 74685
2009-07-02 02:09:07 +00:00
Daniel Dunbar 36a2007059 llvm-mc/x86: Factor out ParseX86Register.
llvm-svn: 74684
2009-07-02 01:58:24 +00:00
Evan Cheng 979da0e590 80 col violation.
llvm-svn: 74683
2009-07-02 01:30:04 +00:00
Chris Lattner 4ec83ea628 clarify: stub emission depends on the version of the linker you use, it has nothing
to do with the target.  Also, the stub elimination optimization *requires* making the
stub explicit.

llvm-svn: 74682
2009-07-02 01:24:34 +00:00
Evan Cheng d9c55368e7 Factor out ARM indexed load matching code.
llvm-svn: 74681
2009-07-02 01:23:32 +00:00
Devang Patel bbf38f8f3b Add debug info utility routines.
llvm-svn: 74680
2009-07-02 01:15:24 +00:00
Daniel Dunbar 142f104b29 llvm-mc/x86: Rename X86Operand::ScaleReg to IndexReg and make order consistent
with syntax.

llvm-svn: 74679
2009-07-02 00:51:52 +00:00
Owen Anderson 0ff993839c Maintain the old LTO API, by using the global context.
llvm-svn: 74678
2009-07-02 00:31:14 +00:00
Devang Patel 6bab414f87 Simplify.
llvm-svn: 74677
2009-07-02 00:28:03 +00:00
Dan Gohman 43f33dd550 Fix a bunch of other places that used operator[] to test whether
a key is present in a std::map or DenseMap to use find instead.

llvm-svn: 74676
2009-07-02 00:17:47 +00:00
Owen Anderson f7691d398d Add a C wrapper for accessing the global default context.
llvm-svn: 74675
2009-07-02 00:16:38 +00:00
John Mosby f4f2f14f57 fix ld error with -no-undefined switch, which is undefined on darwin8
llvm-svn: 74674
2009-07-02 00:10:23 +00:00
Devang Patel 846a5e4d3e Simplify. No intentional functionality change.
llvm-svn: 74673
2009-07-02 00:08:09 +00:00
Douglas Gregor 1554825e20 Look through vector types when determining the base type of a type for declarator printing. Bug found via the PCH tester
llvm-svn: 74672
2009-07-01 23:58:14 +00:00
Owen Anderson 02a9da33b3 Try again at converting the LLParser to use LLVMContext, without massive breakage this time.
llvm-svn: 74671
2009-07-01 23:57:11 +00:00
Owen Anderson 7d12807ef0 Add a few methods that got left out earlier.
llvm-svn: 74670
2009-07-01 23:56:45 +00:00
Daniel Dunbar 84190f9a4d Try to clarify a point about getting DominatorTree info from a module pass.
llvm-svn: 74668
2009-07-01 23:38:44 +00:00
Dale Johannesen 4e6044c405 Add darwin stub removal to wishlist.
llvm-svn: 74667
2009-07-01 23:36:02 +00:00
Fariborz Jahanian 5c6af0a998 Use Destroy for member initializer list clean up.
Per Doug's comments. Doug please review.

llvm-svn: 74666
2009-07-01 23:35:25 +00:00