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
Evan Cheng
b7a20ee5b5
Add nounwind.
...
llvm-svn: 100482
2010-04-05 22:30:05 +00:00
Evan Cheng
23d16d5b86
Fix ADD32rr_alt instruction encoding bug. Patch by Marius Wachtler.
...
llvm-svn: 100480
2010-04-05 22:21:09 +00:00
Chris Lattner
adca608281
fix a really nasty bug that Evan was tracking in SCCP. When resolving
...
undefs in branches/switches, we have two cases: a branch on a literal
undef or a branch on a symbolic value which is undef. If we have a
literal undef, the code was correct: forcing it to a constant is the
right thing to do.
If we have a branch on a symbolic value that is undef, we should force
the symbolic value to a constant, which then makes the successor block
live. Forcing the condition of the branch to being a constant isn't
safe if later paths become live and the value becomes overdefined. This
is the case that 'forcedconstant' is designed to handle, so just use it.
This fixes rdar://7765019 but there is no good testcase for this, the
one I have is too insane to be useful in the future.
llvm-svn: 100478
2010-04-05 22:14:48 +00:00
Douglas Gregor
01fa5c3734
Grrrr
...
llvm-svn: 100476
2010-04-05 21:47:48 +00:00
Douglas Gregor
0228a9c76b
Try to de-bork build of WPA
...
llvm-svn: 100475
2010-04-05 21:47:24 +00:00
Daniel Dunbar
dc406b8e92
IRgen: Move BitField LValues to just hold a reference to the CGBitFieldInfo.
...
- Unfortunately, this requires some horrible code in CGObjCMac which always
allocats a CGBitFieldInfo because we don't currently build a proper layout
for Objective-C classes. It needs to be cleaned up, but I don't want the
bit-field cleanups to be blocked on that.
llvm-svn: 100474
2010-04-05 21:36:35 +00:00
Douglas Gregor
cf04b02d1d
Extend the type printing policy to allow one to turn off the printing
...
of file locations for anonymous tag types (e.g., "enum <anonymous at
t.h:15:6>"), which can get rather long.
llvm-svn: 100470
2010-04-05 21:25:31 +00:00
Jeffrey Yasskin
6e085c1efe
Print the errors when a clang test fails instead of just listing the
...
failing test files.
llvm-svn: 100469
2010-04-05 21:20:38 +00:00
Chris Lattner
c832c1bf69
some code cleanups, use SwitchInst::findCaseValue, reduce indentation
...
llvm-svn: 100468
2010-04-05 21:18:32 +00:00
Evan Cheng
ba930449a9
Code clean up.
...
llvm-svn: 100467
2010-04-05 21:16:25 +00:00
Eric Christopher
1290fa0f72
Remove FIXME.
...
llvm-svn: 100466
2010-04-05 21:14:32 +00:00
Douglas Gregor
d03e823fb4
Clarify the ownership semantics of the Diagnostic object used by
...
ASTUnit. Previously, we would end up with use-after-free errors
because the Diagnostic object would be creating in one place (say,
CIndex) and its ownership would not be transferred into the
ASTUnit. Fixes <rdar://problem/7818608>.
llvm-svn: 100464
2010-04-05 21:10:19 +00:00
Douglas Gregor
41e692dcf1
Introduce MaybeOwningPtr, a smart pointer that may (or may not) have
...
ownership over the pointer it contains. Useful when we want to
communicate ownership while still having several clients holding on to
the same pointer *without* introducing reference counting.
llvm-svn: 100463
2010-04-05 21:09:22 +00:00
Devang Patel
a2c048eaf8
Emit debug info for objc getters and setters.
...
llvm-svn: 100462
2010-04-05 21:09:15 +00:00
Jeffrey Yasskin
7dd816097a
Fix OProfileJITEventListener build for new DebugLoc.
...
llvm-svn: 100461
2010-04-05 21:09:12 +00:00
Dan Gohman
f38547c83f
Add a comment.
...
llvm-svn: 100459
2010-04-05 20:24:08 +00:00
Chris Lattner
bc217873e3
lowering a volatile llvm.memcpy to a libc memcpy is ok.
...
PR6779
llvm-svn: 100457
2010-04-05 20:11:45 +00:00
Dan Gohman
918a90a3ca
Don't do code sinking on unreachable blocks. It's unprofitable and hazardous.
...
llvm-svn: 100455
2010-04-05 19:17:22 +00:00
Dan Gohman
976d1b6002
Add an isReachableFromEntry to MachineDominators, following the one
...
in Dominators.
llvm-svn: 100454
2010-04-05 19:16:38 +00:00
Chris Lattner
da081a8e1f
fix PR6780, properly handling the IR {|} escapes in inline asm strings.
...
llvm-svn: 100449
2010-04-05 18:44:00 +00:00