Gabor Greif
a21bc0fbd5
const-ize predicate ValueIsOnlyUsedLocallyOrStoredToOneGlobal
...
llvm-svn: 100546
2010-04-06 18:58:22 +00:00
Chris Lattner
e6485c5873
add a testcase that the integrated assembler rejects, this verifies
...
that the integrated assembler is working.
llvm-svn: 100545
2010-04-06 18:46:25 +00:00
Gabor Greif
0439789023
use CallSite to access calls vs. invokes uniformly
...
and remove assumptions about operand order
llvm-svn: 100544
2010-04-06 18:45:08 +00:00
Chris Lattner
5ec32e7fd8
teach clang to install the inline asm diagnostic handler,
...
allowing backend errors to be mapped through clang's
diagnostics subsystem, including the backend location info.
We now get:
$ clang asm.c -c -o t.o -integrated-as
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
1 diagnostic generated.
With colors, and correct "# diagnostics generated".
llvm-svn: 100543
2010-04-06 18:38:50 +00:00
Chris Lattner
6c61f4434c
this accessor doesn't need to copy the string.
...
llvm-svn: 100542
2010-04-06 18:37:22 +00:00
Chris Lattner
97c4cb8947
enhance SMDiagnostic to also maintain a pointer to the SourceMgr.
...
Add a simplified constructor for clients that don't have locations
like "file not found" errors.
llvm-svn: 100538
2010-04-06 18:06:18 +00:00
Chris Lattner
6d67213ebb
reduce indentation, tidy.
...
llvm-svn: 100537
2010-04-06 17:52:14 +00:00
Blaine Garst
55050630a9
improved wording around ABI
...
llvm-svn: 100536
2010-04-06 17:46:43 +00:00
Douglas Gregor
d720daf8bc
Make code-completion for Objective-C message sends to "id" work in the
...
presence of precompiled headers by forcibly loading all of the
methods we know about from the PCH file before constructing our
code-completion list.
llvm-svn: 100535
2010-04-06 17:30:22 +00:00
Chris Lattner
c0e8a59ac9
fit in 80 cols
...
llvm-svn: 100534
2010-04-06 17:29:22 +00:00
Fariborz Jahanian
440a6832c5
Put type restriction on convesion to nonconforming 'id' back in
...
block pointer type comparison.
llvm-svn: 100533
2010-04-06 17:23:39 +00:00
Evan Cheng
a910f17a20
Code clean up. Move includes from VirtRegRewriter.h to VirtRegRewriter.cpp.
...
llvm-svn: 100532
2010-04-06 17:19:55 +00:00
Stuart Hastings
c067196984
Revise debug info machinery to digest nested functions and classes.
...
A certain GDB testsuite case (local.cc) has a function nested inside a
class nested inside another function. GCC presents the innermost
function to llvm-convert first. Heretofore, the debug info mistakenly
placed the inner function at module scope. This patch walks the GCC
context links and instantiates the outer class and function so the
debug info is properly nested. Radar 7426545.
llvm-svn: 100530
2010-04-06 17:19:32 +00:00
Daniel Dunbar
3d45e17d15
Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
...
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.
llvm-svn: 100529
2010-04-06 17:07:49 +00:00
Douglas Gregor
6285f754fa
Implement support for code completion of an Objective-C message send to
...
"id" or an expression of type "id". In these cases, we produce a list
of all of the (class or instance) methods, respectively, that we know about.
Note that this implementation does not yet work well with precompiled
headers; that's coming soon.
llvm-svn: 100528
2010-04-06 16:40:00 +00:00
Douglas Gregor
e7938a04c8
Add test for code completion of Objective-C message sends to classes.
...
llvm-svn: 100527
2010-04-06 15:27:03 +00:00
Douglas Gregor
be9ea80abf
Perform code-completion within ParseCastExpression, which handles,
...
e.g., the right-hand side of binary expressions.
llvm-svn: 100526
2010-04-06 15:09:27 +00:00
John Criswell
9003e0f0c7
Adding SAFECode to the list of projects that work with LLVM 2.7.
...
llvm-svn: 100525
2010-04-06 14:52:14 +00:00
Mon P Wang
bf86224d5e
Remove assert to treat memmove and memset like memcpy
...
llvm-svn: 100521
2010-04-06 08:27:51 +00:00
Owen Anderson
ee3570f0ff
Use a ManagedCleanup to prevent leaking the PassRegistrar map. In breaks the
...
use case where someone wants to resurrect LLVM after calling llvm_shutdown,
but I'm not aware of any clients that are affected by this.
llvm-svn: 100519
2010-04-06 04:20:48 +00:00
Douglas Gregor
6314641822
clang-wpa fixes for Diagnostic
...
llvm-svn: 100518
2010-04-06 04:03:12 +00:00
Jakob Stoklund Olesen
2ae30e864d
Avoid overflowing a signed integer which triggers undefined behaviour.
...
Overflowing an unsigned integer is fine and behaves as you would expect.
Also fix a pasto, allowing SignExtend64 to take a 64-bit argument.
llvm-svn: 100517
2010-04-06 03:12:43 +00:00
Zhongxing Xu
0f290ec0f0
Fix PR 6725. It looks like the copy constructor gets elided during inlining.
...
This bug only shows up with GCC 4.4.1 Release-Asserts build.
llvm-svn: 100516
2010-04-06 03:01:56 +00:00
Dan Gohman
91ce8e9a5c
Add a const qualifier.
...
llvm-svn: 100515
2010-04-06 01:31:12 +00:00
Douglas Gregor
ff8f4f6262
Unbreak build
...
llvm-svn: 100514
2010-04-06 01:25:58 +00:00
Daniel Dunbar
196ea449ed
IRgen: Move BitFieldIsSigned bit into CGBitFieldInfo.
...
llvm-svn: 100513
2010-04-06 01:07:44 +00:00
Daniel Dunbar
d45491077a
Simplify.
...
llvm-svn: 100512
2010-04-06 01:07:41 +00:00
Daniel Dunbar
60d81e8611
Simplify.
...
llvm-svn: 100511
2010-04-06 01:07:39 +00:00
Chris Lattner
92aba5a817
propagate cookie management out one layer of function calls.
...
llvm-svn: 100510
2010-04-06 00:58:50 +00:00
Chris Lattner
59126b2500
report errors through LLVMContext's inline asm handler if available.
...
llvm-svn: 100509
2010-04-06 00:55:39 +00:00
Chris Lattner
f226748324
Give MachineModuleInfo an actual Module*.
...
llvm-svn: 100508
2010-04-06 00:51:52 +00:00
Chris Lattner
60955d42bd
give LLVMContext an inline asm diagnostic hook member.
...
llvm-svn: 100506
2010-04-06 00:44:45 +00:00
Devang Patel
fc4a1db23b
Remove unnecessary include.
...
llvm-svn: 100505
2010-04-06 00:38:32 +00:00
Chris Lattner
654091391b
give the SourceMgr object a cookie.
...
llvm-svn: 100504
2010-04-06 00:33:43 +00:00
Chris Lattner
3c799811c1
Give llvm::SourceMgr the ability to have a client-specified
...
diagnostic handler.
llvm-svn: 100503
2010-04-06 00:26:48 +00:00
Douglas Gregor
104e6ff852
Remove MaybeOwningPtr. We're going to use reference-counting instead.
...
llvm-svn: 100499
2010-04-05 23:53:46 +00:00
Douglas Gregor
7f95d26e53
Make Diagnostic reference-counted, which is simpler than juggling
...
maybe-ownership vs. ownership.
llvm-svn: 100498
2010-04-05 23:52:57 +00:00
Jakob Stoklund Olesen
1a9b3f3484
Properly enable load clustering.
...
Operand 2 on a load instruction does not have to be a RegisterSDNode for this to
work.
llvm-svn: 100497
2010-04-05 23:48:02 +00:00
Ted Kremenek
273c4f53ec
Use cast<> + OpaquePtr.getAs<Decl> to add extra checking of our assumptions.
...
llvm-svn: 100496
2010-04-05 23:45:09 +00:00
Evan Cheng
272a2f8432
Fix an obvious copy-n-paste bug. It's not known to cause any miscompilation.
...
llvm-svn: 100494
2010-04-05 23:33:29 +00:00
Chris Lattner
61955ab200
inline in MC assembly parsers. clang -integrated-as now
...
works with inline asm!
llvm-svn: 100493
2010-04-05 23:33:20 +00:00
Chris Lattner
3b21e4d404
Give AsmParser an option to control whether it finalizes
...
the stream. New demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
000000000000000b movl %eax,(%rsp)
000000000000000e movl %eax,0x04(%rsp)
0000000000000012 addq $0x08,%rsp
0000000000000016 ret
llvm-svn: 100492
2010-04-05 23:15:42 +00:00
Chris Lattner
8900ef1931
add .o file writing for inline asm in llc. Here's a silly
...
demo:
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
<inline asm>:1:2: error: unrecognized instruction
abc incl %eax
^
LLVM ERROR: Error parsing inline asm
Only problem seems to be that the parser finalizes OutStreamer
at the end of the first inline asm, which isn't what we want.
For example:
$ cat asm.c
int foo(int X) {
__asm__ ("incl %0" : "+r" (X));
return X;
}
$ clang asm.c -S -o - -emit-llvm | llc
...
subq $8, %rsp
movl %edi, (%rsp)
movl %edi, %eax
## InlineAsm Start
incl %eax
## InlineAsm End
movl %eax, (%rsp)
movl %eax, 4(%rsp)
addq $8, %rsp
ret
$ clang asm.c -S -o - -emit-llvm | llc -filetype=obj -o t.o
$ otool -tv t.o
t.o:
(__TEXT,__text) section
_foo:
0000000000000000 subq $0x08,%rsp
0000000000000004 movl %edi,(%rsp)
0000000000000007 movl %edi,%eax
0000000000000009 incl %eax
$
don't stop at inc!
llvm-svn: 100491
2010-04-05 23:11:24 +00:00
Chris Lattner
bdc3f34150
add a comment.
...
llvm-svn: 100490
2010-04-05 23:07:42 +00:00
Chris Lattner
3d18e71ae8
tidy #includes.
...
llvm-svn: 100489
2010-04-05 23:07:18 +00:00
Bill Wendling
30346347b3
Output floating point representations in DWARF format. This is done by outputing
...
the FP encoding directly as a hex representation.
llvm-svn: 100487
2010-04-05 22:59:21 +00:00
Chris Lattner
802e1088de
update unit test for api change.
...
llvm-svn: 100486
2010-04-05 22:49:48 +00:00
Chris Lattner
0e45d24a4e
stringref-ize the MemoryBuffer::get apis. This requires
...
a co-committed clang patch.
llvm-svn: 100485
2010-04-05 22:42:30 +00:00
Chris Lattner
58c79341ab
Match MemoryBuffer API changes.
...
llvm-svn: 100484
2010-04-05 22:42:27 +00:00
Ted Kremenek
b535782fc4
Fix possible null dereference by bailing out of CheckObjCPropertyAttributes() early if the Decl* is null.
...
llvm-svn: 100483
2010-04-05 22:39:42 +00:00