Commit Graph

76322 Commits

Author SHA1 Message Date
Victor Hernandez d0b2ff9b7a Fix if/else brackets; getFunctionForValue() is to be called for non-metadata values
llvm-svn: 93984
2010-01-20 06:22:33 +00:00
Nick Kledzik ac02b5a09c fix return type of _Unwind_Exception.exception_cleanup
llvm-svn: 93983
2010-01-20 06:13:20 +00:00
Chandler Carruth 26b29a0892 Move the MacroBuilder utilitiy to its own header. Update references.
Comments and/or improvements to the documentation are welcome.

llvm-svn: 93982
2010-01-20 06:13:02 +00:00
Daniel Dunbar 415763612a Fix an invalid Twine use spotty by abbeyj, it isn't safe to use Twine
temporaries (this is one reason I'm nervous about propagating their use beyond
particularly performance critical places).

llvm-svn: 93981
2010-01-20 06:09:53 +00:00
Chandler Carruth d6514b1e13 Fix the conditions to unambiguously show the logic they represent. This is the
logic enforced in the test case as well, so hopefully it is correct. Please
review Victor.

llvm-svn: 93980
2010-01-20 06:01:02 +00:00
Victor Hernandez 5fa88d4e30 Map operands of all function-local metadata, not just metadata passed to llvm.dbg.declare intrinsics
llvm-svn: 93979
2010-01-20 05:49:59 +00:00
Victor Hernandez 20425abea4 Avoid unnecessary Elts array
llvm-svn: 93978
2010-01-20 05:44:11 +00:00
Victor Hernandez e5f2af7594 Refactor common parts of MDNode::getFunction() and assertLocalFunction() into getFunctionForValue()
llvm-svn: 93977
2010-01-20 04:45:57 +00:00
Chandler Carruth 5b6d9265ba Actually remove the include that r93974 made unnecessary.
llvm-svn: 93975
2010-01-20 04:09:11 +00:00
Chandler Carruth b0af340592 Fix a layering issue between Basic and FE by moving a utility class into Basic.
This isn't entirely satisfactory, as it seems an implementation detail, and
with nothing to do with TargetInfo. Suggestions on where to put this are
welcome.

llvm-svn: 93974
2010-01-20 03:59:11 +00:00
Zhongxing Xu 00c6046a81 Add a missing case for DeclContext printer.
llvm-svn: 93973
2010-01-20 03:21:28 +00:00
Daniel Dunbar 3f3e2cd820 Driver: Lift clang resource directory computation to the Driver object.
llvm-svn: 93971
2010-01-20 02:35:16 +00:00
Daniel Dunbar e2b661c26c clang/Darwin: Update for rename of 10.4 static runtime library.
llvm-svn: 93970
2010-01-20 02:35:02 +00:00
Daniel Dunbar 857138f663 clang/Darwin: Rename x86_10.4 static lib config to just 10.4, and add 'eprintf'
which seems to be needed.

llvm-svn: 93969
2010-01-20 02:34:31 +00:00
Mike Stump 06c1d87d14 Also handle CXXConstructor, CXXDestructor and CXXConversion in CFG
printing.

llvm-svn: 93968
2010-01-20 02:28:05 +00:00
Devang Patel 7771b7c621 If a instruction belongs to another function (and not current function) as per debug info attached with the instruction then ignore the dangling lexical scope of this instruction. Such scopes are unreachable.
llvm-svn: 93967
2010-01-20 02:05:23 +00:00
Mike Stump 281d6d7745 Use the llvm coding convention for indentation for switch.
llvm-svn: 93966
2010-01-20 02:03:14 +00:00
Fariborz Jahanian 98609b3a07 Patch to implement required warnings for unimplemented
properties imported frfom protocol. Fixes radar 7544809.

llvm-svn: 93965
2010-01-20 01:51:55 +00:00
John McCall 1bcb2631e6 Make UnresolvedSet.h standalone.
llvm-svn: 93964
2010-01-20 01:36:13 +00:00
Mike Stump 845384a938 Wire up the EH context for the catch clauses to the outer EH context. WIP.
llvm-svn: 93963
2010-01-20 01:30:58 +00:00
Mike Stump 0bdba6cdd8 Add an exceptional edge from the try terminated block to the outer EH
context (try or the Exit block) when there isn't a catch (...).

Improve CFG printing for catch (...).

llvm-svn: 93962
2010-01-20 01:15:34 +00:00
Douglas Gregor 52606ff2ca Attempt to improve CIndex Doxygen organization, although I can't actually test this locally
llvm-svn: 93961
2010-01-20 01:10:47 +00:00
David Greene 3b2a68ceb8 Add some asserts to check SelectionDAG problems earlier.
llvm-svn: 93960
2010-01-20 00:59:23 +00:00
John McCall ad371258aa Give UnresolvedSet the ability to store access specifiers for each declaration.
Change LookupResult to use UnresolvedSet.  Also extract UnresolvedSet into its
own header and make it templated over an inline capacity.

llvm-svn: 93959
2010-01-20 00:46:10 +00:00
Daniel Dunbar e43fe7cbb7 For 'install-clang' target, also traverse tools/clang/lib/Runtime.
llvm-svn: 93958
2010-01-20 00:43:07 +00:00
Douglas Gregor b693f65c4d Remove some #if 0'd code that's never going to get used.
llvm-svn: 93957
2010-01-20 00:34:08 +00:00
Mike Stump 06b602e540 Improve CheckFallThrough analysis in the presense of the new C++ EH
support.  WIP.

llvm-svn: 93956
2010-01-20 00:34:04 +00:00
Douglas Gregor 9074c3fe97 Kill off clang_getDeclColumn, clang_getDeclExtent, clang_getDeclLine,
clang_getDeclSource, and clang_getDeclSourceFile; the cursor
equivalents are the way of the future.

llvm-svn: 93955
2010-01-20 00:26:57 +00:00
Douglas Gregor d2fc7277be Introduce a special cursor kind for the translation unit, to serve as
the root of the conceptual cursor hierarchy (just like we do with
declarations). This will be used when we get to unify
clang_loadTranslationUnit() and clang_loadDeclaration() into something
more generally useful.

llvm-svn: 93954
2010-01-20 00:23:15 +00:00
Dale Johannesen 91970b4ea2 Move findDebugLoc somewhere more central. Fix
more cases where debug declarations affect
debug line info.

llvm-svn: 93953
2010-01-20 00:19:24 +00:00
Douglas Gregor c0943d089f CXCursor_UnexposedDecl to the first declaration kind
llvm-svn: 93952
2010-01-20 00:07:45 +00:00
Dan Gohman 954f49014d Fold (add x, shl(0 - y, n)) -> sub(x, shl(y, n)), to simplify some code
that SCEVExpander can produce when running on behalf of LSR.

llvm-svn: 93949
2010-01-19 23:30:49 +00:00
Chris Lattner e87668db26 add support for Fedora 10 x86_64, there really should be a better way to handle this.
patch by Dmitry

llvm-svn: 93948
2010-01-19 23:30:00 +00:00
Douglas Gregor 084236fafd Kill CXCursor_ObjCSelectorRef, CXCursor_VarRef, CXCursor_FunctionRef,
and CXCursor_EnumConstantRef; they've been subsumed by expression
references, which do a much nicer job.

llvm-svn: 93947
2010-01-19 23:25:01 +00:00
Douglas Gregor 8f40bbee78 Extend the CIndex API with direct support for expressions and
statements, moving some of the more unnatural kinds of references
(VarRef, EnumConstantRef, etc.) over to the expressions. We can now
poke at arbitrary expressions and statements with, e.g.,
clang_getCursor() and get back useful information (e.g., source
ranges).

llvm-svn: 93946
2010-01-19 23:20:36 +00:00
Mike Stump 314825bc8a Implement goto inside of blocks.
llvm-svn: 93945
2010-01-19 23:08:01 +00:00
Eric Christopher 99469702a3 Update and move around comments.
llvm-svn: 93942
2010-01-19 22:58:35 +00:00
Bob Wilson 6a4491b8c7 Wrap some comments to 80 columns.
llvm-svn: 93940
2010-01-19 22:56:26 +00:00
Dan Gohman 221708d826 Make SCEVAddRecExpr's getType return a pointer type when the add
has a pointer member. This helps reduce unnecessary bitcasting
and uglygeps.

llvm-svn: 93939
2010-01-19 22:53:50 +00:00
Dale Johannesen aa6655557b Fix a case where debug_value was perturbing the
line number info.

llvm-svn: 93937
2010-01-19 22:50:05 +00:00
Dan Gohman ca19445d08 When doing address-mode sinking, expand the base register first, rather
than the scaled register. This makes it more likely that subsequent
AddrModeMatcher queries will match the new address the same way as the
old, instead of accidentally matching what had been the base register
as the new scaled register, and then failing to match the scaled register.
This fixes some problems with address-mode sinking multiple muls into a
block, which will be a lot more common with some upcoming
LoopStrengthReduction changes.

llvm-svn: 93935
2010-01-19 22:45:06 +00:00
Chris Lattner 003b5c8472 give MCAsmInfo a 'has little endian' bit. This is unfortunate, but
I really want clients of the streamer to be able to say "emit this
64-bit integer" and have it get broken down right by the streamer.

I may change this in the future, we'll see how it works out.

llvm-svn: 93934
2010-01-19 22:42:28 +00:00
John McCall 5d7aa7fa0a The type of a compound literal expression is not necessarily the same as the
type which was syntactically written.  Fixes PR 6080.

llvm-svn: 93933
2010-01-19 22:33:45 +00:00
Dan Gohman 8d67d2f5f8 Add a comment and tidy up some whitespace.
llvm-svn: 93932
2010-01-19 22:27:22 +00:00
Dan Gohman 510bffca45 Fix a typo and an 80-column violation in comments.
llvm-svn: 93931
2010-01-19 22:26:02 +00:00
Dan Gohman f86d904b7d Give ScalarEvolution access to the DominatorTree. It'll need this
to make more intellegent AddRec folding decisions.

llvm-svn: 93930
2010-01-19 22:21:27 +00:00
Chris Lattner eaef5e111d simplify the rest of fp constant printing.
llvm-svn: 93929
2010-01-19 22:16:33 +00:00
Douglas Gregor 7d1efeb43d Kill the unused and unnecessary CXCursor_MemberRef, twin to the
now-dead CXCursor_ObjCIvarRef.

llvm-svn: 93928
2010-01-19 22:15:34 +00:00
Douglas Gregor 015026e358 Kill CXCursor_ObjCIvarRef. Such cursors could never be created, and
have been marked for death for a while.

llvm-svn: 93927
2010-01-19 22:11:32 +00:00
Chris Lattner c70daf316e simplify the code for printing x86 long double, don't do work
for -fverbose-asm unless it's on.

llvm-svn: 93926
2010-01-19 22:11:05 +00:00