Anton Korobeynikov
24a6316aaa
Some pretty-printing
...
llvm-svn: 90742
2009-12-07 02:28:41 +00:00
Anton Korobeynikov
1bcece70bd
Truncate the arguments of llvm.frameaddress / llvm.returnaddress intrinsics from i32 to platform's largest native type
...
llvm-svn: 90741
2009-12-07 02:28:26 +00:00
Anton Korobeynikov
ff4ab51400
Add lowering of returnaddr and frameaddr intrinsics. Shamelessly stolen from x86 :)
...
llvm-svn: 90740
2009-12-07 02:28:10 +00:00
Anton Korobeynikov
b4be8ce537
Initial codegen support for MSP430 ISRs
...
llvm-svn: 90739
2009-12-07 02:27:53 +00:00
Anton Korobeynikov
27a0ecfa39
Add MSP430 interrupt calling conv. No functionality change yet.
...
llvm-svn: 90738
2009-12-07 02:27:35 +00:00
Anton Korobeynikov
28d3c733aa
Add ability to select hw multiplier mode and select appropriate libcalls.
...
llvm-svn: 90737
2009-12-07 02:27:08 +00:00
Chris Lattner
0f3a228e73
add 'F' to a bunch of libm builtins so that codegen doesn't die on them,
...
pointed out by Charles Davis.
llvm-svn: 90736
2009-12-07 02:09:14 +00:00
Chris Lattner
9dfed9fdb6
fix -dM with variadic macros, PR5699
...
llvm-svn: 90735
2009-12-07 01:58:34 +00:00
Chris Lattner
5a6fb511c7
rename names for consistency
...
llvm-svn: 90734
2009-12-07 01:57:13 +00:00
Chris Lattner
01c73e1b16
filecheckize
...
llvm-svn: 90733
2009-12-07 01:49:36 +00:00
Chris Lattner
76b4445d6f
some code cleanup.
...
llvm-svn: 90732
2009-12-07 01:42:56 +00:00
Chris Lattner
d62268a668
remove some defaulted params for consistency.
...
llvm-svn: 90731
2009-12-07 01:38:03 +00:00
Chris Lattner
1c4280328d
reapply my patch for PR4451, which improves diagnostics for :: vs : confusion.
...
This time with a fix to bail out when in a dependent context.
llvm-svn: 90730
2009-12-07 01:36:53 +00:00
Chris Lattner
045cbffb65
fix a crash on invalid I found when working on something unrelated.
...
llvm-svn: 90729
2009-12-07 00:48:47 +00:00
Rafael Espindola
662908cdcf
Fix typos. Thanks to John Tytgat for noticing it!
...
llvm-svn: 90728
2009-12-07 00:27:35 +00:00
Eli Friedman
d0e8de2cd8
Move RequireCompleteType requirement for fields early into ActOnField so that
...
subsequent code which depends on a complete type does the right thing.
llvm-svn: 90727
2009-12-07 00:22:08 +00:00
Sam Weinig
75b6f62d68
Remove a now out of date and out of place comment about predefined exprs from the FloatingLiteral class declaration.
...
llvm-svn: 90726
2009-12-06 23:57:56 +00:00
Sam Weinig
d060ed4d70
Don't print a void return type for C++ constructors and destructors when generating a predefined expr for them.
...
llvm-svn: 90725
2009-12-06 23:55:13 +00:00
Anton Korobeynikov
75dfed4fa5
Dynamic stack realignment use of sp register as source/dest register
...
in "bic sp, sp, #15" leads to unpredicatble behaviour in Thumb2 mode.
Emit the following code instead:
mov r4, sp
bic r4, r4, #15
mov sp, r4
llvm-svn: 90724
2009-12-06 22:39:50 +00:00
Eli Friedman
f2eda5efd2
Be a bit more complete about accumulating SavedThisAdjustments.
...
llvm-svn: 90723
2009-12-06 22:33:51 +00:00
Eli Friedman
8174f2c23c
Work-in-progess rewrite of thunks: move thunk generation outside of vtable
...
generation, and make sure we generate thunks when the function is defined
rather than when the vtable is defined.
llvm-svn: 90722
2009-12-06 22:01:30 +00:00
Douglas Gregor
94bb5e8d75
PointerUnion == PointerUnion does not do what I thought it did. Also, fix a thinko in a PointerUnion::get call.
...
llvm-svn: 90719
2009-12-06 21:27:58 +00:00
Steve Naroff
30484700c5
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=81871
http://llvm.org/viewvc/llvm-project?view=rev&revision=81936
http://llvm.org/viewvc/llvm-project?view=rev&revision=81945
llvm-svn: 90718
2009-12-06 21:14:13 +00:00
Chris Lattner
ed085234dc
revert my previous patch, it is breaking something and I don't have time
...
to fix it ATM.
llvm-svn: 90717
2009-12-06 20:58:07 +00:00
Eli Friedman
71a26d8f82
Move helper onto CXXMethodDecl.
...
llvm-svn: 90716
2009-12-06 20:50:05 +00:00
Douglas Gregor
05e7ca3659
Switch the std::multimap shadow map used in code completion to an
...
llvm::DenseMap, for a 20% performance improvement in the
Cocoa-big-list performance benchmark.
llvm-svn: 90715
2009-12-06 20:23:50 +00:00
Chris Lattner
2b6651e908
this is really about both PR's, 4452 is "don't crash", 4451 is "recover nicely".
...
llvm-svn: 90714
2009-12-06 19:11:41 +00:00
Chris Lattner
71d5bf1c5d
implement PR4451, improving error recovery for a mistaken : where a :: was
...
intended. On the first testcase in the bug, we now produce:
cxx-decl.cpp:12:2: error: unexpected ':' in nested name specifier
y:a a2;
^
::
instead of:
t.cc:8:1: error: C++ requires a type specifier for all declarations
x:a a2;
^
t.cc:8:2: error: invalid token after top level declarator
x:a a2;
^
;
t.cc:9:11: error: use of undeclared identifier 'a2'
x::a a3 = a2;
^
llvm-svn: 90713
2009-12-06 19:08:11 +00:00
Chris Lattner
8c56c49fe0
simplify logic.
...
llvm-svn: 90712
2009-12-06 18:34:27 +00:00
Anders Carlsson
3efc6e6f46
Add rudimentary support for member pointers to CGDebugInfo.
...
llvm-svn: 90711
2009-12-06 18:00:51 +00:00
Chris Lattner
3c7b86f4ee
remove some extraneous syntax: sourceloc implicitly converts to sourcerange.
...
llvm-svn: 90710
2009-12-06 17:36:05 +00:00
Chris Lattner
72ecc68e11
use new helpers to simplify code.
...
llvm-svn: 90709
2009-12-06 17:22:42 +00:00
Chris Lattner
6d6f10fe91
fix PR5698
...
llvm-svn: 90708
2009-12-06 17:17:23 +00:00
Chris Lattner
7a141b3d88
remove extraneous comma clang warns about
...
llvm-svn: 90707
2009-12-06 16:58:41 +00:00
Zhongxing Xu
efd9ae8a85
Add test case for mktemp. Patch by Lei Zhang.
...
llvm-svn: 90706
2009-12-06 12:45:46 +00:00
Daniel Dunbar
6c8884ce08
Drop Preprocessor/open-failure test, it breaks running the test suite as root,
...
and I can't figure out how to write it more portably.
llvm-svn: 90705
2009-12-06 10:07:46 +00:00
Daniel Dunbar
1597da4c05
Document that CompilerInvocation::createDiagnostics keeps a reference to the DiagnosticOptions, and update callers to make sure they don't pass in a temporary.
...
llvm-svn: 90704
2009-12-06 09:56:30 +00:00
Daniel Dunbar
a6cb9f21be
Fix an off by one in findEndOfWord, which could scan past the end of the string in a corner case.
...
llvm-svn: 90703
2009-12-06 09:56:18 +00:00
Eli Friedman
eddf1213e2
Fix a slight oversight in computing whether a copy constructor is elidable.
...
Fixes PR5695.
llvm-svn: 90702
2009-12-06 09:26:33 +00:00
Daniel Dunbar
58ecb2ab51
Unbreak and add test case for r90276, a situation in which getBuffer is expected to fail.
...
Also, update SourceManager.h doxyments for getBuffer() to reflect reality.
llvm-svn: 90701
2009-12-06 09:19:25 +00:00
Daniel Dunbar
1776679e71
Change Preprocessor::EnterSourceFile to make ErrorStr non-optional, clients should be forced to deal with error conditions.
...
llvm-svn: 90700
2009-12-06 09:19:12 +00:00
Daniel Dunbar
7cea5f1747
Add a pretty horrible hack to prevent clang from crashing with inconsistent PCH
...
files.
- The issue is that PCH uses a stat cache, which may reference files which have
been deleted or moved. In such cases ContentCache::getBuffer was returning 0
but most clients are incapable of dealing with this (i.e., they don't).
For the time being, resolve this issue by just making up some invalid file
contents and. Eventually we should detect that we are in an inconsistent
situation and error out with a nice message that the PCH is out of date.
llvm-svn: 90699
2009-12-06 05:43:36 +00:00
Chris Lattner
778cb92235
constant fold loads from memcpy's from global constants. This is important
...
because clang lowers nontrivial automatic struct/array inits to memcpy from
a global array.
llvm-svn: 90698
2009-12-06 05:29:56 +00:00
Chris Lattner
93236ba327
add support for forwarding mem intrinsic values to non-local loads.
...
llvm-svn: 90697
2009-12-06 04:54:31 +00:00
Chris Lattner
850a3cd905
gvn is optimizing this better now.
...
llvm-svn: 90696
2009-12-06 04:16:05 +00:00
Chris Lattner
42376066eb
Handle forwarding local memsets to loads. For example, we optimize this:
...
short x(short *A) {
memset(A, 1, sizeof(*A)*100);
return A[42];
}
to 'return 257' instead of doing the load.
llvm-svn: 90695
2009-12-06 01:57:02 +00:00
Chris Lattner
d15e11ad98
Add helper methods for forming shift operations with a constant
...
shift amount.
llvm-svn: 90694
2009-12-06 01:56:22 +00:00
Steve Naroff
287a2bfc03
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=86026
Note: The 'improved debugging' changes weren't integrated (since they were later reverted, since they didn't improve debugging).
llvm-svn: 90693
2009-12-06 01:52:22 +00:00
Steve Naroff
94ed6dc906
Integrate the following from the 'objective-rewrite' branch:
...
http://llvm.org/viewvc/llvm-project?view=rev&revision=82174
llvm-svn: 90692
2009-12-06 01:48:44 +00:00
Chris Lattner
eb5bb1bf78
merge two tests.
...
llvm-svn: 90691
2009-12-06 01:47:24 +00:00