Commit Graph

80117 Commits

Author SHA1 Message Date
Bill Wendling 31d7f0d96a Forgot testcase for r98599.
llvm-svn: 98602
2010-03-16 01:54:20 +00:00
Bill Wendling a8f54f032d When checking if something's killed, don't rely simply on whether it's marked as
"used outside of the block". If the block ends in a return, then it won't be
used outside of it.

llvm-svn: 98599
2010-03-16 01:05:35 +00:00
Douglas Gregor 874cc62876 Use SourceManager's Diagnostic object for all file-reading errors,
simplifying the SourceManager interfaces somewhat.

llvm-svn: 98598
2010-03-16 00:35:39 +00:00
Chris Lattner f57437abb1 don't form a RecordChild or CheckChildType for child #'s over 7, we don't
have enums for them.

llvm-svn: 98597
2010-03-16 00:35:11 +00:00
Bob Wilson ba75e81644 Wrap a long line and add some parens to be consistent.
llvm-svn: 98596
2010-03-16 00:31:15 +00:00
Chris Lattner db035a0af2 Fix the third (and last known) case of code update problems due
to LLVM IR changes with addr label weirdness.  In the testcase, we
generate references to the two bb's when codegen'ing the first
function:

_test1:                                 ## @test1
	leaq	Ltmp0(%rip), %rax
..
	leaq	Ltmp1(%rip), %rax

Then continue to codegen the second function where the blocks
get merged.  We're now smart enough to emit both labels, producing
this code:

_test_fun:                              ## @test_fun
## BB#0:                                ## %entry
Ltmp1:                                  ## Block address taken
Ltmp0:
## BB#1:                                ## %ret
	movl	$-1, %eax
	ret

Rejoice.

llvm-svn: 98595
2010-03-16 00:29:39 +00:00
Douglas Gregor e0fbb83b8b Give SourceManager a Diagnostic object with which to report errors,
and start simplifying the interfaces in SourceManager that can fail.

llvm-svn: 98594
2010-03-16 00:06:06 +00:00
Daniel Dunbar 5599256415 MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
- Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue.
 - This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol.

llvm-svn: 98592
2010-03-15 23:51:06 +00:00
Douglas Gregor 0adf3182b0 Add some <cstdio> includes to unbreak the buildbots
llvm-svn: 98591
2010-03-15 23:33:37 +00:00
Dan Gohman c6ddebd6d1 Recognize code for doing vector gather/scatter index calculations with
32-bit indices. Instead of shuffling each element out of the index vector,
when all indices are needed, just store the input vector to the stack and
load the elements out.

llvm-svn: 98588
2010-03-15 23:23:03 +00:00
Eric Christopher 8c6f61394f Add remaining sse4.1 intrinsics and builtins.
llvm-svn: 98587
2010-03-15 23:22:58 +00:00
Bob Wilson 3f2293bc02 Translate "cc" clobber in ARM inline assembly to ARM::CCRRegisterClass.
Radar 7459078.

llvm-svn: 98586
2010-03-15 23:09:18 +00:00
Douglas Gregor 802b77601e Introduce a new BufferResult class to act as the return type of
SourceManager's getBuffer() (and similar) operations. This abstract
can be used to force callers to cope with errors in getBuffer(), such
as missing files and changed files. Fix a bunch of callers to use the
new interface.

Add some very basic checks for file consistency (file size,
modification time) into ContentCache::getBuffer(), although these
checks don't help much until we've updated the main callers (e.g.,
SourceManager::getSpelling()).

llvm-svn: 98585
2010-03-15 22:54:52 +00:00
Devang Patel 45c1505bf6 Skip debug info intrinsics.
llvm-svn: 98584
2010-03-15 22:23:03 +00:00
Daniel Dunbar fe8d866fc7 MC/Mach-O/x86_64: Temporary labels in cstring sections require symbols (and external relocations, but we don't have x86_64 relocations yet).
llvm-svn: 98583
2010-03-15 21:56:50 +00:00
Daniel Dunbar 232dc953ac MC/Mach-O: Add MCSectionMachO::getType()
llvm-svn: 98582
2010-03-15 21:56:38 +00:00
Devang Patel b21991c4f5 Skip debug info intrinsics.
llvm-svn: 98581
2010-03-15 21:25:29 +00:00
Bill Wendling bbcaa40227 Now that the default for Darwin platforms is to place the LSDA into the TEXT
section, remove the target-specific code that performs this.

llvm-svn: 98580
2010-03-15 21:09:38 +00:00
Chris Lattner 561334a81f Implement support for the case when a reference to a addr-of-bb
label is generated, but then the block is deleted.  Since the
value is undefined, we just emit the label right after the entry 
label of the function.  It might matter that the label is in the
same section as the function was afterall.

llvm-svn: 98579
2010-03-15 20:39:00 +00:00
Chris Lattner c116a8707a use Mang->getSymbol()
llvm-svn: 98578
2010-03-15 20:37:57 +00:00
Chris Lattner 2ea586b8f5 use Mang->getSymbol() more.
llvm-svn: 98577
2010-03-15 20:37:38 +00:00
Douglas Gregor 6d7d7b5197 Extend MemoryBuffer::getFile() to take an optional "stat" structure
pointer. If given, the structure will be set with the stat information from
the file actually read.

llvm-svn: 98575
2010-03-15 20:32:14 +00:00
Ted Kremenek d133a86aa3 Move method FindPropertyVisibleInPrimaryClass() from ObjCContainerDecl to ObjCInterfaceDecl.
Also change this method to lookup property declarations using DeclContext::lookup().

llvm-svn: 98574
2010-03-15 20:30:07 +00:00
Ted Kremenek ddcd1093a4 Change ObjCCategoryDecl::FindPropertyDeclaration() to lookup
property decls using DeclContext::lookup().

llvm-svn: 98571
2010-03-15 20:11:53 +00:00
Ted Kremenek 4fb821ec0d Make 'findPropertyDecl()' a static method of ObjCPropertyDecl.
llvm-svn: 98570
2010-03-15 20:11:46 +00:00
Devang Patel f2bce7cbae Create SDDbgValue for dbg_value intrinsics and remember its connections with DAG nodes.
This is a work in progress. Patch by Dale Johannesen!

llvm-svn: 98568
2010-03-15 19:15:44 +00:00
Chris Lattner 347a0eb85c Fix the case when a reference to an address taken BB is emitted in one
function, then the BB is RAUW'd before the definition is emitted.  There
are still two cases not being handled, but this should improve us back to
the situation before I touched anything.

llvm-svn: 98566
2010-03-15 19:09:43 +00:00
Devang Patel d3f41e8939 In "empty" bb, the return instruction may not be first instruction, if dbg value intrinsics are present in this bb. Use terminator to find return instructions.
llvm-svn: 98565
2010-03-15 19:05:46 +00:00
Bill Wendling 0344874921 Place the LSDA into the TEXT section for x86 Darwin. If the global it's pointing
to is local to the translation unit, we need to place fill the value of that
symbol into the non-lazy pointer.

This should conclude all Darwin changes for placing the LSDA into the TEXT
section. There is some cleanup to do. I.e., there's no longer a special need for
target-specific code here. But that can come later.

llvm-svn: 98564
2010-03-15 19:04:37 +00:00
Evan Cheng ae5edee6c8 Avoid sibcall optimization if either caller or callee is using sret semantics.
llvm-svn: 98561
2010-03-15 18:54:48 +00:00
Ted Kremenek e01bec9791 Add 'expected-note'
llvm-svn: 98560
2010-03-15 18:47:29 +00:00
Ted Kremenek 679708ee34 Correctly determine if the @property has been previously declared. If
a property has the same name as the ivar it wraps then the old logic
wouldn't find the previous property declaration.

llvm-svn: 98559
2010-03-15 18:47:25 +00:00
Chris Lattner 49ee281213 revert r98550, it isn't necessary or sufficient.
llvm-svn: 98558
2010-03-15 18:42:01 +00:00
Fariborz Jahanian b397e43dea objective-c++ must take into account qualifiers when
considering valid objc pointer converions.

llvm-svn: 98557
2010-03-15 18:36:00 +00:00
Devang Patel a3e9c9ca7b Emit dwarf variable info communicated by code generator through DBG_VALUE machine instructions.
This is a work in progress.

llvm-svn: 98556
2010-03-15 18:33:46 +00:00
Ted Kremenek f3bc99dd56 Add comment to CFG to 'buildCFG()' arguments indicating that scope
support is not fully implemented.

llvm-svn: 98555
2010-03-15 17:45:13 +00:00
Ted Kremenek bc1a67bee3 Rename clang_constructUSR_ObjCategory to clang_constructUSR_ObjCCategory.
(there was a missing 'C').

llvm-svn: 98554
2010-03-15 17:38:58 +00:00
Kovarththanan Rajaratnam 94b9af889e Remove useless forward decl.
llvm-svn: 98553
2010-03-15 17:31:29 +00:00
Chris Lattner 51a6eb7d12 don't eliminate address-taken blocks here.
llvm-svn: 98550
2010-03-15 16:37:42 +00:00
Chris Lattner c73a361ac5 SIGN_EXTEND from the same type as the dest is valid.
llvm-svn: 98548
2010-03-15 16:15:56 +00:00
Chris Lattner d5df1f5b54 sink the call to VT.getSizeInBits() down into its uses,
not all unary nodes necessarily have a simple result type.

llvm-svn: 98547
2010-03-15 16:05:15 +00:00
Douglas Gregor ea16606fcd During C++ name lookup, use DeclContext::Equals() rather than
comparing DeclContext pointers, to avoid having to remember to call
getPrimaryContext() everywhere. This is the last part PR6594.

llvm-svn: 98546
2010-03-15 15:26:48 +00:00
Douglas Gregor 6623006249 Implement C++ [temp.local]p8, which specifies that a template
parameter hides a namespace-scope declararion with the same name in an
out-of-line definition of a template. The lookup requires a strange
interleaving of lexical and semantic scopes (go C++), which I have not
yet handled in the typo correction/code completion path.

Fixes PR6594.

llvm-svn: 98544
2010-03-15 14:33:29 +00:00
Duncan Sands 145584e037 Treat copysignl like the other copysign functions.
llvm-svn: 98542
2010-03-15 14:01:44 +00:00
John McCall c33dec3664 Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.
llvm-svn: 98541
2010-03-15 10:54:44 +00:00
John McCall 3e11ebebc8 Remember declaration scope qualifiers in the AST. Imposes no memory overhead
on unqualified declarations.

Patch by Enea Zaffanella!  Minimal adjustments:  allocate the ExtInfo nodes
with the ASTContext and delete them during Destroy().  I audited a bunch of
Destroy methods at the same time, to ensure that the correct teardown was
being done.

llvm-svn: 98540
2010-03-15 10:12:16 +00:00
John McCall 1e3a1a7eff Remember access paths for visible conversion decls.
llvm-svn: 98539
2010-03-15 09:07:48 +00:00
Jeffrey Yasskin a1d3908a35 Don't save a temporary string into a StringRef field.
llvm-svn: 98538
2010-03-15 06:59:21 +00:00
Chris Lattner 632eb65cd2 fix MCSectionELF to not leak memory, just like I did for MCSymbol.
MCSectionMachO is already fine (yay for fixed size arrays?),
MCSectionCOFF still leaks.

llvm-svn: 98537
2010-03-15 06:23:52 +00:00
Chris Lattner 133487696a fix a memory leak yjasskin pointed out: MCSymbol is bump pointer
allocated and thus not freed.  This is cool except that it contains
and std::string so the string data didn't get freed.  In any case
there is no reason to redundantly store the string data in the 
MCSymbol anyway, just make the MCSymbol ref the string data in the
MCContext StringMap.

llvm-svn: 98536
2010-03-15 06:15:35 +00:00