Douglas Gregor
9bd6db5834
Eliminate clang_getInstantiationLocationOffset(), and instead add an
...
offset parameter to clang_getInstantiationLocation().
llvm-svn: 94573
2010-01-26 19:19:08 +00:00
Dan Gohman
85be4333ad
Make the unsigned-range code more consistent with the signed-range code,
...
and clean up some loose ends.
llvm-svn: 94572
2010-01-26 19:19:05 +00:00
Ken Dyck
5262b11962
Use CharUnits for alignments in character units.
...
llvm-svn: 94571
2010-01-26 19:13:33 +00:00
Evan Cheng
8703c412f4
Code refactoring, no functionality change.
...
llvm-svn: 94570
2010-01-26 19:04:47 +00:00
Bob Wilson
9c71bb03f3
Revert 94484. Re-disable unittests that need RTTI.
...
llvm-svn: 94569
2010-01-26 19:04:37 +00:00
Victor Hernandez
9ecd2f039f
Switch AllocaDbgDeclares to SmallVector and don't leak DIFactory
...
llvm-svn: 94567
2010-01-26 18:57:53 +00:00
Sebastian Redl
497c0a418d
Fix two redefinitions in test cases that weren't diagnosed yet, but will be soon.
...
llvm-svn: 94565
2010-01-26 18:52:33 +00:00
Ken Dyck
a0f99ff230
Use CharUnits for alignment of UTF16 string in GetAddrOfConstantCFString().
...
llvm-svn: 94564
2010-01-26 18:46:23 +00:00
Ken Dyck
e5402e4749
Use CharUnits for alignment in EmitNullInitializationLValue().
...
llvm-svn: 94563
2010-01-26 18:35:11 +00:00
Dan Gohman
a01418d75a
Fix a typo in a comment that Duncan noticed.
...
llvm-svn: 94562
2010-01-26 18:32:54 +00:00
Douglas Gregor
6165611986
Implement clang_annotateTokens(), which associates cursors with each
...
of the tokens within a raw token stream. This does not even attempt to
handle macros yet.
llvm-svn: 94561
2010-01-26 18:31:56 +00:00
Dan Gohman
1c7e3837fb
Remove SIL, DIL, and BPL from the GR8_NOREX allocation order also.
...
llvm-svn: 94560
2010-01-26 18:30:24 +00:00
Fariborz Jahanian
f9e8c2b759
Refix rewriting of an ivar access when it is
...
type-cast to its sub-class (radar 7575882).
llvm-svn: 94559
2010-01-26 18:28:51 +00:00
Dan Gohman
ed71d8d70b
SIL, DIL, BPL, and SPL require a REX prefix.
...
llvm-svn: 94558
2010-01-26 18:14:22 +00:00
Ted Kremenek
b478ff4efc
Add 'PostVisitTU' callback hook to 'perform_test_load()' to allow a special callback after the translation unit has been loaded (and streamed).
...
llvm-svn: 94557
2010-01-26 17:59:48 +00:00
Ted Kremenek
a97a5cd59e
Allow the 'visitor' argument to 'perform_test_load()' to be NULL. The
...
utility of this change will be made clearer in a subsequent patch when
perform_test_load()' does more than stream the AST.
llvm-svn: 94556
2010-01-26 17:55:33 +00:00
Anders Carlsson
ca4a5459d8
Use the right definition when emitting a global variable. Fixes PR5564.
...
llvm-svn: 94555
2010-01-26 17:43:42 +00:00
Anders Carlsson
7228117108
Change getUnique to return a GlobalDecl. Fixes PR6147.
...
llvm-svn: 94554
2010-01-26 17:36:47 +00:00
Ken Dyck
a6046ab82b
Correct cut-and-paste error in doxygen comment for newly introduced
...
getTypeAlignInChars().
llvm-svn: 94553
2010-01-26 17:25:18 +00:00
Ken Dyck
24d28d6cde
Add getTypeAlignInChars() for use in code that works in alignments in character
...
units.
llvm-svn: 94552
2010-01-26 17:22:55 +00:00
Douglas Gregor
27b4fa994d
Introduce a CIndex API for lexing the raw tokens within a given source
...
range. The token-annotation function does nothing, yet.
llvm-svn: 94551
2010-01-26 17:06:03 +00:00
Ken Dyck
86a8c957da
Replace inheritance of RegionRawOffset from std::pair with two private member
...
variables to improve readability and encapsulation.
llvm-svn: 94550
2010-01-26 17:01:47 +00:00
Dan Gohman
fdb744b203
Rename ItCount to BECount, since it holds a backedge-taken count rather
...
than an iteration count.
llvm-svn: 94549
2010-01-26 16:46:18 +00:00
Dan Gohman
d86e295f8e
Fix ICmpInst::makeConstantRange to use ConstantRange's API properly
...
in the case of empty and full ranges.
llvm-svn: 94548
2010-01-26 16:04:20 +00:00
Dan Gohman
3f8ed9e1ae
Fix a typo that several people pointed out. Also, address the case of
...
wrapping that Duncan pointed out.
llvm-svn: 94547
2010-01-26 15:56:18 +00:00
Mikhail Glushenkov
8e66b8eb20
Support -arch.
...
llvm-svn: 94546
2010-01-26 14:55:44 +00:00
Mikhail Glushenkov
c9c6456a85
Support for -iquote.
...
llvm-svn: 94545
2010-01-26 14:55:30 +00:00
Mikhail Glushenkov
d115cb60fe
Better error message.
...
llvm-svn: 94544
2010-01-26 14:55:16 +00:00
Mikhail Glushenkov
81068d0a3d
Escape double quotes in 'help'.
...
llvm-svn: 94543
2010-01-26 14:55:04 +00:00
Ken Dyck
98ca79435a
Introduce CodeGenModule::GetTargetTypeStoreSize() to calculate the store size
...
of LLVM types in character units.
llvm-svn: 94542
2010-01-26 13:48:07 +00:00
Duncan Sands
de018dcfad
Tweak the way appendModuleInlineAsm works, so you aren't obliged
...
to append a newline when using setModuleInlineAsm in case later
someone calls appendModuleInlineAsm - make newline handling fully
automatic. In case anyone is wondering there is only one user of
appendModuleInlineAsm: the dragonegg plugin.
llvm-svn: 94539
2010-01-26 11:58:04 +00:00
Torok Edwin
aec063332e
Regenerate configure.
...
With the previous cleanup to configure.ac, configure is now only 393k, instead of 1.1M!
llvm-svn: 94535
2010-01-26 08:50:50 +00:00
Torok Edwin
1e86bc50c7
Remove unneeded checks from configure.ac.
...
HAVE_{BI,STD,FWD}_ITERATOR and HAVE_NAMESPACES were not used in the code.
bison and flex are no longer used.
CAN_DLOPEN_SELF was never used either.
AC_PROG_LIBTOOL is not needed since we don't use libtool, we only need the
libltdl checks for dlopen.
Add check for AR, it used to be done by AC_PROG_LIBTOOL.
AC_TYPE_SIGNAL is deprecated, follow autoupdate's suggestion and replace with
void.
Remove unused m4 files.
Configure can now be generated using autoconf 2.65 too, without any warnings!
llvm-svn: 94534
2010-01-26 08:48:04 +00:00
Torok Edwin
b3b43e65ba
Fix autoconf 2.65 warning (don't use _cv_ inside AC_CACHE_VAL).
...
llvm-svn: 94533
2010-01-26 08:43:05 +00:00
Bill Wendling
9f4f770e1d
Remove warning about non return on a non-void function.
...
llvm-svn: 94532
2010-01-26 08:27:24 +00:00
John McCall
1f6386b79b
Avoid some unnecessary copying of unresolved lookup results.
...
llvm-svn: 94531
2010-01-26 07:37:41 +00:00
John McCall
8fe6808de0
Handle redeclarations found by ADL deterministically and reasonably.
...
This solution relies on an O(n) scan of redeclarations, which means it might
scale poorly in crazy cases with tons of redeclarations brought in by a ton
of distinct associated namespaces. I believe that avoiding this
is not worth the common-case cost.
llvm-svn: 94530
2010-01-26 07:16:45 +00:00
Chris Lattner
547c761dd6
eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is
...
subsumed by TargetLowering::getJumpTableEncoding(). Change uses of
it to be more specific.
llvm-svn: 94529
2010-01-26 06:53:37 +00:00
Chris Lattner
4db603f93b
Now that printPICJumpTableSetLabel is not overloaded,
...
inline it into its only caller, allowing us to simplify it
and hoist bits out of the loop.
llvm-svn: 94528
2010-01-26 06:42:44 +00:00
Chandler Carruth
72343706c1
Correctly treat 64 bit integers specified via the mode attribute as the 'long'
...
type when that type is 64 bits wide, and the 'long long' type when 'long' is
only 32 bits wide. This fixes PR6108.
Also adds a bunch of test cases to ensure proper conversion between equally
sized standard types and mode-specified types on both 32 and 64 bit targets.
llvm-svn: 94527
2010-01-26 06:39:24 +00:00
Chris Lattner
8a785d7a67
Move getJTISymbol from MachineJumpTableInfo to MachineFunction,
...
which is more convenient, and change getPICJumpTableRelocBaseExpr
to take a MachineFunction to match.
Next, move the X86 code that create a PICBase symbol to
X86TargetLowering::getPICBaseSymbol from
X86MCInstLower::GetPICBaseSymbol, which was an asmprinter specific
library. This eliminates a 'gross hack', and allows us to
implement X86ISelLowering::getPICJumpTableRelocBaseExpr which now
calls it.
This in turn allows us to eliminate the
X86AsmPrinter::printPICJumpTableSetLabel method, which was the
only overload of printPICJumpTableSetLabel.
llvm-svn: 94526
2010-01-26 06:28:43 +00:00
Anders Carlsson
d6b21e4842
If a global variable has an initializer with side effects, it can never be deferred (even if it's in an anonymous namespace).
...
llvm-svn: 94525
2010-01-26 06:15:16 +00:00
John McCall
91f61fc921
Allow ADL to find functions imported by using decls. Leave wordy comment
...
about interaction between ADL and default arguments. Shrug shoulders, commit.
llvm-svn: 94524
2010-01-26 06:04:06 +00:00
Chris Lattner
273735bc5a
add a new MachineJumpTableInfo::getJTISymbol method,
...
use it to implement the default TargetLowering::getPICJumpTableRelocBaseExpr
llvm-svn: 94523
2010-01-26 05:58:28 +00:00
Chandler Carruth
0354bf4405
Remove a few more references to index-test; this was killed in r94210.
...
llvm-svn: 94522
2010-01-26 05:36:44 +00:00
Chris Lattner
8a6c1eaabb
stub out a new target hook, need some refactoring before I can
...
implement it.
llvm-svn: 94521
2010-01-26 05:30:30 +00:00
Anders Carlsson
0b5f1ddf0a
Fix another debug info crash with virtual bases.
...
llvm-svn: 94520
2010-01-26 05:26:39 +00:00
Anders Carlsson
17ed0496c5
Fix the test I broke, and also fix a crash when declaring a virtual destructor. Add debug info support for pure virtual member functions.
...
llvm-svn: 94519
2010-01-26 05:19:50 +00:00
Chris Lattner
cc0f734cd0
simplify asmprinter: only emit .set directives when entries have
...
EK_LabelDifference32 kind and the target has .set support. Simplify
X86AsmPrinter::printPICJumpTableSetLabel to make use of recent helpers.
llvm-svn: 94518
2010-01-26 05:15:20 +00:00
Chris Lattner
279de3ef64
rename printPICJumpTableEntry -> EmitJumpTableEntry,
...
make it private and non-virtual. It handles the non-pic
case too, so just use it, simplifying EmitJumpTableInfo.
llvm-svn: 94517
2010-01-26 05:10:10 +00:00