platform/upstream/llvm.git
15 years agoPrivatize the ConstantArray table.
Owen Anderson [Tue, 21 Jul 2009 20:55:28 +0000 (20:55 +0000)]
Privatize the ConstantArray table.

llvm-svn: 76639

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 20:52:43 +0000 (20:52 +0000)]
Prep for new warning.

llvm-svn: 76638

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 20:50:41 +0000 (20:50 +0000)]
Prep for new warning.

llvm-svn: 76637

15 years agoAdd a few fairly obvious API changes I noticed while porting some old code.
Torok Edwin [Tue, 21 Jul 2009 20:27:10 +0000 (20:27 +0000)]
Add a few fairly obvious API changes I noticed while porting some old code.

llvm-svn: 76636

15 years agoMissed a piece of the commit to remove the shift flavor.
Eli Friedman [Tue, 21 Jul 2009 20:15:24 +0000 (20:15 +0000)]
Missed a piece of the commit to remove the shift flavor.

llvm-svn: 76635

15 years agoPrivatize the first of the value maps.
Owen Anderson [Tue, 21 Jul 2009 20:13:12 +0000 (20:13 +0000)]
Privatize the first of the value maps.

llvm-svn: 76634

15 years agoRemove shift amount flavor. It isn't actually complete enough to
Eli Friedman [Tue, 21 Jul 2009 20:12:16 +0000 (20:12 +0000)]
Remove shift amount flavor.  It isn't actually complete enough to
be useful, and it's currently unused.  (Some issues: it isn't actually
rich enough to capture the semantics on many architectures, and
semantics can vary depending on the type being shifted.)

llvm-svn: 76633

15 years agodriver: Print --version on stdout, to match gcc.
Daniel Dunbar [Tue, 21 Jul 2009 20:06:58 +0000 (20:06 +0000)]
driver: Print --version on stdout, to match gcc.
 - Patch by Jean-Daniel Dupas

llvm-svn: 76632

15 years agoRemove a couple of already-implemented notes.
Eli Friedman [Tue, 21 Jul 2009 20:05:43 +0000 (20:05 +0000)]
Remove a couple of already-implemented notes.

llvm-svn: 76631

15 years agoMisc fixes for -Wreorder:
Eli Friedman [Tue, 21 Jul 2009 19:28:10 +0000 (19:28 +0000)]
Misc fixes for -Wreorder:

1. Make it work correctly with anonymous unions.
2. Don't compute it if the warning isn't enabled.
3. Optimize the algorithm slightly to make it linear time in the
case where we don't produce any warnings.

llvm-svn: 76630

15 years ago80 col violation.
Evan Cheng [Tue, 21 Jul 2009 19:25:09 +0000 (19:25 +0000)]
80 col violation.

llvm-svn: 76629

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:03:43 +0000 (19:03 +0000)]
Prep for new warning.

llvm-svn: 76628

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:02:55 +0000 (19:02 +0000)]
Prep for new warning.

llvm-svn: 76627

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:48 +0000 (19:01 +0000)]
Prep for new warning.

llvm-svn: 76626

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:31 +0000 (19:01 +0000)]
Prep for new warning.

llvm-svn: 76625

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:01:01 +0000 (19:01 +0000)]
Prep for new warning.

llvm-svn: 76624

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 19:00:12 +0000 (19:00 +0000)]
Prep for new warning.

llvm-svn: 76623

15 years agoMake Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
Douglas Gregor [Tue, 21 Jul 2009 18:59:28 +0000 (18:59 +0000)]
Make Sema::ActOnCXXEnterDeclaratorScope robust against failures to compute
the declaration context, as occurs with out-of-line class template member
definitions.

llvm-svn: 76622

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:59:16 +0000 (18:59 +0000)]
Prep for new warning.

llvm-svn: 76621

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:58:50 +0000 (18:58 +0000)]
Prep for new warning.

llvm-svn: 76620

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:58:15 +0000 (18:58 +0000)]
Prep for new warning.

llvm-svn: 76619

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:57:14 +0000 (18:57 +0000)]
Prep for new warning.

llvm-svn: 76617

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:56:34 +0000 (18:56 +0000)]
Prep for new warning.

llvm-svn: 76616

15 years agoPrefix IR dumps with LiveInterval indices when possible. This turns
David Greene [Tue, 21 Jul 2009 18:56:32 +0000 (18:56 +0000)]
Prefix IR dumps with LiveInterval indices when possible.  This turns
this:

%ESI<def> = MOV32rr %EDI<kill>
ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
%reg1027<def> = MOVZX64rr32 %ESI
%reg1027<def> = ADD64ri8 %reg1027, 15, %EFLAGS<imp-def,dead>
%reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
%RDI<def> = MOV64rr %RSP
%RDI<def> = SUB64rr %RDI, %reg1027<kill>, %EFLAGS<imp-def,dead>
%RSP<def> = MOV64rr %RDI

into this:

4 %reg1024<def> = MOV32rr %EDI<kill>
12 ADJCALLSTACKDOWN64 0, %RSP<imp-def>, %EFLAGS<imp-def,dead>, %RSP<imp-use>
20 %reg1025<def> = MOVZX64rr32 %reg1024
28 %reg1026<def> = MOV64rr %reg1025<kill>
36 %reg1026<def> = ADD64ri8 %reg1026, 15, %EFLAGS<imp-def,dead>
44 %reg1027<def> = MOV64rr %reg1026<kill>
52 %reg1027<def> = AND64ri8 %reg1027, -16, %EFLAGS<imp-def,dead>
60 %reg1028<def> = MOV64rr %RSP
68 %reg1029<def> = MOV64rr %reg1028<kill>
76 %reg1029<def> = SUB64rr %reg1029, %reg1027<kill>, %EFLAGS<imp-def,dead>
84 %RSP<def> = MOV64rr %reg1029

This helps greatly when debugging register allocation and coalescing
problems.

llvm-svn: 76615

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:56:04 +0000 (18:56 +0000)]
Prep for new warning.

llvm-svn: 76614

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:54:29 +0000 (18:54 +0000)]
Prep for new warning.

llvm-svn: 76613

15 years agoAdd fake v7 itineraries for now.
Evan Cheng [Tue, 21 Jul 2009 18:54:14 +0000 (18:54 +0000)]
Add fake v7 itineraries for now.

llvm-svn: 76612

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:52:41 +0000 (18:52 +0000)]
Prep for new warning.

llvm-svn: 76611

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:51:31 +0000 (18:51 +0000)]
Prep for new warning.

llvm-svn: 76610

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:48:43 +0000 (18:48 +0000)]
Prep for new warning.

llvm-svn: 76609

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:46:15 +0000 (18:46 +0000)]
Prep for new warning.

llvm-svn: 76608

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:45:53 +0000 (18:45 +0000)]
Prep for new warning.

llvm-svn: 76607

15 years agoPrep for new warning.
Mike Stump [Tue, 21 Jul 2009 18:45:22 +0000 (18:45 +0000)]
Prep for new warning.

llvm-svn: 76606

15 years agoPrep for new warnings about control flow falling off the ends of
Mike Stump [Tue, 21 Jul 2009 18:44:24 +0000 (18:44 +0000)]
Prep for new warnings about control flow falling off the ends of
functions that return a value.  I was going to buffer the whole lot
up, but it should be easier to review if I check them in
incrementally.  Most of the forth coming changes either add a return
value, or make it impossible to return, or alter the return type.

llvm-svn: 76605

15 years agomake AsmPrinter::doFinalization iterate over the global variables
Chris Lattner [Tue, 21 Jul 2009 18:38:57 +0000 (18:38 +0000)]
make AsmPrinter::doFinalization iterate over the global variables
and call PrintGlobalVariable, allowing elimination and simplification
of various targets.

llvm-svn: 76604

15 years agoAdd PrefixPrinter arguments to the dump routines for MachineFunction and
David Greene [Tue, 21 Jul 2009 18:27:05 +0000 (18:27 +0000)]
Add PrefixPrinter arguments to the dump routines for MachineFunction and
MachineBasicBlock.  We'll use these shortly.

llvm-svn: 76603

15 years agoAdd a small utility class to configure IR printers. This will allow
David Greene [Tue, 21 Jul 2009 18:21:46 +0000 (18:21 +0000)]
Add a small utility class to configure IR printers.  This will allow
printers to do neat and wonderful things when printing debug
information.  The ideas is to allow passes to configer printers to emit
pass-specific information when dumping IR.

llvm-svn: 76602

15 years agoMake a bunch of changes suggested by Chris and others to improve
David Greene [Tue, 21 Jul 2009 18:16:24 +0000 (18:16 +0000)]
Make a bunch of changes suggested by Chris and others to improve
efficiency.  Fix a few formatting bugs along the way.

llvm-svn: 76601

15 years agoDo not select tSXTB / tSXTH in thumb2 mode.
Evan Cheng [Tue, 21 Jul 2009 18:15:26 +0000 (18:15 +0000)]
Do not select tSXTB / tSXTH in thumb2 mode.

llvm-svn: 76600

15 years agoUpdate for LLVM API change.
Owen Anderson [Tue, 21 Jul 2009 18:06:41 +0000 (18:06 +0000)]
Update for LLVM API change.

llvm-svn: 76599

15 years agoRename getConstantInt{True|False} to get{True|False} at Chris' behest.
Owen Anderson [Tue, 21 Jul 2009 18:03:38 +0000 (18:03 +0000)]
Rename getConstantInt{True|False} to get{True|False} at Chris' behest.

llvm-svn: 76598

15 years agoAdd freed memory poisoning in !NDEBUG mode for DenseMap.
Torok Edwin [Tue, 21 Jul 2009 18:01:37 +0000 (18:01 +0000)]
Add freed memory poisoning in !NDEBUG mode for DenseMap.

llvm-svn: 76597

15 years agoreduce indentation by using an early exit.
Chris Lattner [Tue, 21 Jul 2009 17:59:36 +0000 (17:59 +0000)]
reduce indentation by using an early exit.

llvm-svn: 76596

15 years agoUpdate CMake files.
Ted Kremenek [Tue, 21 Jul 2009 17:43:20 +0000 (17:43 +0000)]
Update CMake files.

llvm-svn: 76595

15 years agoUse string comparison instead of numeric comparison when comparing digests.
Ted Kremenek [Tue, 21 Jul 2009 17:41:55 +0000 (17:41 +0000)]
Use string comparison instead of numeric comparison when comparing digests.

llvm-svn: 76594

15 years agowhitespace cleanups, make the MipsAsmPrinter::doInitialization
Chris Lattner [Tue, 21 Jul 2009 17:39:48 +0000 (17:39 +0000)]
whitespace cleanups, make the MipsAsmPrinter::doInitialization
chain to the super class instead of initializing mangler directly.
This gives it .file and module level inline asm support among other
things.

llvm-svn: 76593

15 years agofix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
Chris Lattner [Tue, 21 Jul 2009 17:37:35 +0000 (17:37 +0000)]
fix Sparc, SystemZ, and MSP430 to not override AsmPrinter::doInitialization.
This eliminates redundancy setting up the mangler and adds support to them
for module-level inline asm and a .file directive.

llvm-svn: 76592

15 years agoconvert this test to filecheck format, which is faster and avoids false matches of...
Chris Lattner [Tue, 21 Jul 2009 17:36:24 +0000 (17:36 +0000)]
convert this test to filecheck format, which is faster and avoids false matches of "st" -> "stdin"

llvm-svn: 76591

15 years agoRename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
Chris Lattner [Tue, 21 Jul 2009 17:30:51 +0000 (17:30 +0000)]
Rename LessPrivateGlobalPrefix -> LinkerPrivateGlobalPrefix to match the
LLVM IR concept.

llvm-svn: 76590

15 years agoMove StringRef comparison operators out of class.
Daniel Dunbar [Tue, 21 Jul 2009 17:25:46 +0000 (17:25 +0000)]
Move StringRef comparison operators out of class.

Also, tweak the return type of size().

llvm-svn: 76588

15 years agofix indentation
Chris Lattner [Tue, 21 Jul 2009 17:25:13 +0000 (17:25 +0000)]
fix indentation

llvm-svn: 76587

15 years agoremove an unneeded override.
Chris Lattner [Tue, 21 Jul 2009 17:23:41 +0000 (17:23 +0000)]
remove an unneeded override.

llvm-svn: 76586

15 years agomore random whitespace cleanup, eliminate #define, avoid copying
Chris Lattner [Tue, 21 Jul 2009 17:20:18 +0000 (17:20 +0000)]
more random whitespace cleanup, eliminate #define, avoid copying
vectors needlessly, doxygenify comments, improve constness, etc.

llvm-svn: 76585

15 years agoConsider nested-names as part of the declarator when resolving an ambiguous statement.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 17:05:03 +0000 (17:05 +0000)]
Consider nested-names as part of the declarator when resolving an ambiguous statement.

llvm-svn: 76583

15 years agoadd a testcase for the pic16 section handling stuff.
Chris Lattner [Tue, 21 Jul 2009 16:48:20 +0000 (16:48 +0000)]
add a testcase for the pic16 section handling stuff.

llvm-svn: 76579

15 years agosome simple whitespace cleanup, avoid copying vectors for no reason
Chris Lattner [Tue, 21 Jul 2009 16:44:47 +0000 (16:44 +0000)]
some simple whitespace cleanup, avoid copying vectors for no reason
as much, etc.

llvm-svn: 76578

15 years agoDiagnose when a destructor uses a unrelated class type as its name.
Fariborz Jahanian [Tue, 21 Jul 2009 15:28:50 +0000 (15:28 +0000)]
Diagnose when a destructor uses a unrelated class type as its name.

llvm-svn: 76577

15 years agoAdd the location of the tag keyword into TagDecl. From Enea
Douglas Gregor [Tue, 21 Jul 2009 14:46:17 +0000 (14:46 +0000)]
Add the location of the tag keyword into TagDecl. From Enea
Zaffanella, with tweaks from Abramo Bagnara.

llvm-svn: 76576

15 years agoAdd StringRef::{substr, startswith}.
Daniel Dunbar [Tue, 21 Jul 2009 09:18:49 +0000 (09:18 +0000)]
Add StringRef::{substr, startswith}.

llvm-svn: 76559

15 years agoAnother rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload...
Evan Cheng [Tue, 21 Jul 2009 09:15:00 +0000 (09:15 +0000)]
Another rewriter bug exposed by recent coalescer changes. ReuseInfo::GetRegForReload() should make sure the "switched" register is in the desired register class. I'm surprised this hasn't caused more failures in the past.

llvm-svn: 76558

15 years agoAdd missing include.
Daniel Dunbar [Tue, 21 Jul 2009 08:58:44 +0000 (08:58 +0000)]
Add missing include.

llvm-svn: 76555

15 years agoSwitch this API to StringRef.
Daniel Dunbar [Tue, 21 Jul 2009 08:57:31 +0000 (08:57 +0000)]
Switch this API to StringRef.

llvm-svn: 76554

15 years agoSimplify / normalize some uses of Value::getName.
Daniel Dunbar [Tue, 21 Jul 2009 08:54:24 +0000 (08:54 +0000)]
Simplify / normalize some uses of Value::getName.

llvm-svn: 76553

15 years agoDisambiguate an if statement.
Duncan Sands [Tue, 21 Jul 2009 07:56:29 +0000 (07:56 +0000)]
Disambiguate an if statement.

llvm-svn: 76547

15 years agoRemove the ASTContext parameter from Entity::getPrintableName().
Argyrios Kyrtzidis [Tue, 21 Jul 2009 07:52:21 +0000 (07:52 +0000)]
Remove the ASTContext parameter from Entity::getPrintableName().

llvm-svn: 76546

15 years agoAdd StringRef class, with fixes.
Daniel Dunbar [Tue, 21 Jul 2009 07:28:51 +0000 (07:28 +0000)]
Add StringRef class, with fixes.

llvm-svn: 76543

15 years agounbreak unit-tests on gcc-4.4.
Torok Edwin [Tue, 21 Jul 2009 07:09:05 +0000 (07:09 +0000)]
unbreak unit-tests on gcc-4.4.

llvm-svn: 76542

15 years agoRemove some unused code.
Daniel Dunbar [Tue, 21 Jul 2009 07:08:59 +0000 (07:08 +0000)]
Remove some unused code.

llvm-svn: 76541

15 years agoSupport adding relocations for data sections, handling the cases where
Bruno Cardoso Lopes [Tue, 21 Jul 2009 06:51:32 +0000 (06:51 +0000)]
Support adding relocations for data sections, handling the cases where
global declared symbols are initialized with references from other global
symbols.

llvm-svn: 76540

15 years agoAdd an assert for safety check.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 06:48:06 +0000 (06:48 +0000)]
Add an assert for safety check.

llvm-svn: 76539

15 years agoFix a crash that occurs in this C++ case:
Argyrios Kyrtzidis [Tue, 21 Jul 2009 06:43:26 +0000 (06:43 +0000)]
Fix a crash that occurs in this C++ case:

struct foo {
  static bool value;
};
bool (foo::value); // crash because of parens

llvm-svn: 76538

15 years agoremove a very large testcase for now.
Chris Lattner [Tue, 21 Jul 2009 06:28:36 +0000 (06:28 +0000)]
remove a very large testcase for now.

llvm-svn: 76537

15 years agoAdd jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.
Evan Cheng [Tue, 21 Jul 2009 06:00:18 +0000 (06:00 +0000)]
Add jumps with 8-bit relocation for assembler / disassembler. Patch by Sean Callanan.

llvm-svn: 76536

15 years agoFix a dagga combiner bug: avoid creating illegal constant.
Evan Cheng [Tue, 21 Jul 2009 05:40:15 +0000 (05:40 +0000)]
Fix a dagga combiner bug: avoid creating illegal constant.

Is this really a winning transformation?
fold (shl (srl x, c1), c2) -> (shl (and x, (shl -1, c1)), (sub c2, c1)) or
                              (srl (and x, (shl -1, c1)), (sub c1, c2))

llvm-svn: 76535

15 years agoUpdate for LLVM API change.
Owen Anderson [Tue, 21 Jul 2009 02:57:15 +0000 (02:57 +0000)]
Update for LLVM API change.

llvm-svn: 76534

15 years agoMove a bit more state over to the LLVMContext.
Owen Anderson [Tue, 21 Jul 2009 02:47:59 +0000 (02:47 +0000)]
Move a bit more state over to the LLVMContext.

llvm-svn: 76533

15 years agoKeep only canonical Decls in Entities.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 02:10:32 +0000 (02:10 +0000)]
Keep only canonical Decls in Entities.

llvm-svn: 76532

15 years agoWire up CFG improvements for __builtin_choose_expr.
Mike Stump [Tue, 21 Jul 2009 01:46:17 +0000 (01:46 +0000)]
Wire up CFG improvements for __builtin_choose_expr.

llvm-svn: 76531

15 years agoWire up CFG improvements for do { } while () when the condition is known.
Mike Stump [Tue, 21 Jul 2009 01:27:50 +0000 (01:27 +0000)]
Wire up CFG improvements for do { } while () when the condition is known.

llvm-svn: 76530

15 years agoWire up for statement CFG improvements for conditionals that are known.
Mike Stump [Tue, 21 Jul 2009 01:12:51 +0000 (01:12 +0000)]
Wire up for statement CFG improvements for conditionals that are known.

llvm-svn: 76529

15 years agoAdd the following functions:
Bill Wendling [Tue, 21 Jul 2009 01:07:24 +0000 (01:07 +0000)]
Add the following functions:

- SYSCALL (normal fast system call instruction) [0f 05]
- SYSENTER (system call entry instruction) [0f 34]
- SYSEXIT (system call exit instruction) [0f 35]
- SYSEXIT64 (system call exit instruction to 64-bit user code) [REX.W 0f 35]
- SYSRET (system call return instruction) [0f 07]

Patch by Sean Callanan.

llvm-svn: 76528

15 years agoAdd a testcase for PR2831.
Dan Gohman [Tue, 21 Jul 2009 01:02:18 +0000 (01:02 +0000)]
Add a testcase for PR2831.

llvm-svn: 76527

15 years agoAdd a testcase for PR4569, which is now fixed.
Dan Gohman [Tue, 21 Jul 2009 00:50:52 +0000 (00:50 +0000)]
Add a testcase for PR4569, which is now fixed.

llvm-svn: 76526

15 years agoAdd an svn:ignore.
Dan Gohman [Tue, 21 Jul 2009 00:43:42 +0000 (00:43 +0000)]
Add an svn:ignore.

llvm-svn: 76525

15 years agoMake the range calculations for addrecs to be more conservative,
Dan Gohman [Tue, 21 Jul 2009 00:42:47 +0000 (00:42 +0000)]
Make the range calculations for addrecs to be more conservative,
as they aren't currently prepared to handle complicated overflow
cases.

llvm-svn: 76524

15 years agoWhitespace cleanups.
Dan Gohman [Tue, 21 Jul 2009 00:38:55 +0000 (00:38 +0000)]
Whitespace cleanups.

llvm-svn: 76523

15 years agoWire up CFG improvements for while when the condition is known.
Mike Stump [Tue, 21 Jul 2009 00:38:52 +0000 (00:38 +0000)]
Wire up CFG improvements for while when the condition is known.

llvm-svn: 76522

15 years agoMinor code simplification.
Dan Gohman [Tue, 21 Jul 2009 00:37:45 +0000 (00:37 +0000)]
Minor code simplification.

llvm-svn: 76521

15 years agoFix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.
Evan Cheng [Tue, 21 Jul 2009 00:31:12 +0000 (00:31 +0000)]
Fix ARM isle code that optimize multiply by constants which are power-of-2 +/- 1.

llvm-svn: 76520

15 years agoCross RC coalescing is now on by default.
Evan Cheng [Tue, 21 Jul 2009 00:22:59 +0000 (00:22 +0000)]
Cross RC coalescing is now on by default.

llvm-svn: 76519

15 years agoRemove a file from the test directory that was added by mistake.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:17:57 +0000 (00:17 +0000)]
Remove a file from the test directory that was added by mistake.

llvm-svn: 76518

15 years agorevert 76503 while I figure out what's going on
Dale Johannesen [Tue, 21 Jul 2009 00:12:29 +0000 (00:12 +0000)]
revert 76503 while I figure out what's going on

llvm-svn: 76517

15 years agoRegionStore:
Ted Kremenek [Tue, 21 Jul 2009 00:12:07 +0000 (00:12 +0000)]
RegionStore:
-refactor logic for retrieving bindings from VarDecls into
 RegionStoreManager::RetrieveVar()
- improve RegionStoreManager::CastRetrievedVal() and SimpleSValuate::EvalCastNL
  to better handle casts of values of the same canonical type as well as
  casts of LocAsInteger values.

llvm-svn: 76516

15 years agoChange the semantics for Entity.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:07:06 +0000 (00:07 +0000)]
Change the semantics for Entity.

Entity can now refer to declarations that are not visible outside the translation unit.
It is a wrapper of a pointer union, it's either a Decl* for declarations that don't
"cross" translation units, or an EntityImpl* which is associated with the specific "visible" Decl.

Included is a test case for handling fields across translation units.

llvm-svn: 76515

15 years agodefine __STDC_VERSION__ processor token for c94
Ryan Flynn [Tue, 21 Jul 2009 00:07:02 +0000 (00:07 +0000)]
define __STDC_VERSION__ processor token for c94

llvm-svn: 76514

15 years agoUse temporary output to avoid running index-test with the same commands multiple...
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:46 +0000 (00:06 +0000)]
Use temporary output to avoid running index-test with the same commands multiple times.

llvm-svn: 76513

15 years agoImplement the virtual getNextRedeclaration() for ObjCMethodDecl.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:36 +0000 (00:06 +0000)]
Implement the virtual getNextRedeclaration() for ObjCMethodDecl.

If it's in an ObjCContainerDecl, its "redeclaration" is the method definition in the corresponding ObjCImplDecl.
If it's in an ObjCImplDecl, its "redeclaration" is the method in the interface.

llvm-svn: 76512

15 years agoAdd an assertion for the return value of Decl::getNextRedeclaration().
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:27 +0000 (00:06 +0000)]
Add an assertion for the return value of Decl::getNextRedeclaration().

llvm-svn: 76511

15 years agoRemove the ObjCCategoryImpls vector from Sema class.
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:20 +0000 (00:06 +0000)]
Remove the ObjCCategoryImpls vector from Sema class.
Use ObjCInterfaceDecl::getCategoryClassMethod() and ObjCInterfaceDecl::getCategoryInstanceMethod() for the same functionality.

llvm-svn: 76510

15 years agoRemove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceD...
Argyrios Kyrtzidis [Tue, 21 Jul 2009 00:06:04 +0000 (00:06 +0000)]
Remove Sema::LookupObjCImplementation and replace it with just calling ObjCInterfaceDecl::getImplementation().

llvm-svn: 76509