platform/upstream/llvm.git
12 years agoPlace temporary LTO files into their own subdirectory.
Bill Wendling [Wed, 10 Oct 2012 05:29:15 +0000 (05:29 +0000)]
Place temporary LTO files into their own subdirectory.

llvm-svn: 165599

12 years agoFree the opcode_data malloc'ed memory instead of leaking it - thanks for catching...
Jason Molenda [Wed, 10 Oct 2012 03:47:23 +0000 (03:47 +0000)]
Free the opcode_data malloc'ed memory instead of leaking it - thanks for catching that, Chris.

llvm-svn: 165597

12 years agoHave 'addFnAttr' take the attribute enum value. Then have it build the attribute...
Bill Wendling [Wed, 10 Oct 2012 03:13:20 +0000 (03:13 +0000)]
Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

llvm-svn: 165596

12 years agoHave 'addFnAttr' take the attribute enum value. Then have it build the attribute...
Bill Wendling [Wed, 10 Oct 2012 03:12:49 +0000 (03:12 +0000)]
Have 'addFnAttr' take the attribute enum value. Then have it build the attribute object and add it appropriately. No functionality change.

llvm-svn: 165595

12 years agoTest case for r165480.
Craig Topper [Wed, 10 Oct 2012 02:54:23 +0000 (02:54 +0000)]
Test case for r165480.

llvm-svn: 165594

12 years agoDisable the preprocessing record when indexing a source file
Argyrios Kyrtzidis [Wed, 10 Oct 2012 02:12:50 +0000 (02:12 +0000)]
Disable the preprocessing record when indexing a source file
and modules are not enabled.

llvm-svn: 165593

12 years agoWhen indexing a module file, for the ppIncludedFile callback give
Argyrios Kyrtzidis [Wed, 10 Oct 2012 02:12:47 +0000 (02:12 +0000)]
When indexing a module file, for the ppIncludedFile callback give
an invalid location if the location points to the synthetic buffer
for the module input.

llvm-svn: 165592

12 years ago[modules] Consistently construct a buffer as input to build the module.
Argyrios Kyrtzidis [Wed, 10 Oct 2012 02:12:39 +0000 (02:12 +0000)]
[modules] Consistently construct a buffer as input to build the module.
This means the main file for modules will always be a virtual one.

llvm-svn: 165591

12 years agoReorder some parts of the td file to by in alphabetical order
Reed Kotler [Wed, 10 Oct 2012 01:58:16 +0000 (01:58 +0000)]
Reorder some parts of the td file to by in alphabetical order

llvm-svn: 165590

12 years agoAdding comments to clarify the reason for non-standard style in these files.
Andrew Kaylor [Wed, 10 Oct 2012 01:48:52 +0000 (01:48 +0000)]
Adding comments to clarify the reason for non-standard style in these files.
Patch committed on behalf of Kirill Uhanov

llvm-svn: 165589

12 years agoCosmetic changes
Andrew Kaylor [Wed, 10 Oct 2012 01:45:52 +0000 (01:45 +0000)]
Cosmetic changes

llvm-svn: 165588

12 years agoChange the x86 unwinder from using edis as its disassembler
Jason Molenda [Wed, 10 Oct 2012 01:45:33 +0000 (01:45 +0000)]
Change the x86 unwinder from using edis as its disassembler
API (to get the length of x86 instructions) to using the LLVM-MC
disassembler.
<rdar://problem/12411000>

llvm-svn: 165587

12 years agoThis patch adds new functions to the SectionRef and ObjectFile interfaces to determin...
Andrew Kaylor [Wed, 10 Oct 2012 01:41:33 +0000 (01:41 +0000)]
This patch adds new functions to the SectionRef and ObjectFile interfaces to determine whether or not a section is meant to be read-only.  These functions will be used by the MCJIT RuntimeDyld to give hints to the memory manager during the object loading process in a future patch.

Patch by Ashok Thirumurthi.

llvm-svn: 165586

12 years agoImplement MipsTargetLowering::CanLowerReturn.
Akira Hatanaka [Wed, 10 Oct 2012 01:27:09 +0000 (01:27 +0000)]
Implement MipsTargetLowering::CanLowerReturn.

Patch by Sasa Stankovic.

llvm-svn: 165585

12 years agoTidy up formatting.
Richard Smith [Wed, 10 Oct 2012 01:12:11 +0000 (01:12 +0000)]
Tidy up formatting.

llvm-svn: 165584

12 years ago-fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.
Richard Smith [Wed, 10 Oct 2012 01:11:12 +0000 (01:11 +0000)]
-fcatch-undefined-behavior: catch a VLA bound which evalutes to a non-positive value.

llvm-svn: 165583

12 years ago-fcatch-undefined-behavior: handler for VLA bound which evaluates to a non-positive...
Richard Smith [Wed, 10 Oct 2012 01:10:59 +0000 (01:10 +0000)]
-fcatch-undefined-behavior: handler for VLA bound which evaluates to a non-positive value.

llvm-svn: 165582

12 years agoFix test broken by r165572.
Richard Smith [Wed, 10 Oct 2012 01:02:07 +0000 (01:02 +0000)]
Fix test broken by r165572.

llvm-svn: 165581

12 years agoSomeone was using vi and left a little something in the code.
Greg Clayton [Wed, 10 Oct 2012 00:58:07 +0000 (00:58 +0000)]
Someone was using vi and left a little something in the code.

llvm-svn: 165580

12 years agoSwitched AppleObjCRuntimeV2::CreateClassDescriptor
Sean Callanan [Wed, 10 Oct 2012 00:46:46 +0000 (00:46 +0000)]
Switched AppleObjCRuntimeV2::CreateClassDescriptor
over to simply update its cache and then look up
the descriptor in the cache.  This is fine because
the cache now builds much faster (since descriptors
are minimal).

Metaclasses aren't in the cache, so I switched
the Describe method for class descriptors from using
GetClassDescriptor to manually creating an automatic
ClassDescriptorV2.

llvm-svn: 165579

12 years agoRevert "Use a special path to place the .o files in."
Bob Wilson [Tue, 9 Oct 2012 23:59:01 +0000 (23:59 +0000)]
Revert "Use a special path to place the .o files in."

This reverts commit 165428 in an attempt to get our buildbots going.

llvm-svn: 165574

12 years agoRevert "Use a special path to place the .o files in."
Bob Wilson [Tue, 9 Oct 2012 23:57:08 +0000 (23:57 +0000)]
Revert "Use a special path to place the .o files in."

This reverts commit 165429 in an attempt to get our buildbots going.

llvm-svn: 165573

12 years ago-fcatch-undefined-behavior: store the type name directly at the end of a type descrip...
Richard Smith [Tue, 9 Oct 2012 23:55:19 +0000 (23:55 +0000)]
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.

llvm-svn: 165572

12 years ago-fcatch-undefined-behavior: store the type name directly at the end of a type descrip...
Richard Smith [Tue, 9 Oct 2012 23:55:18 +0000 (23:55 +0000)]
-fcatch-undefined-behavior: store the type name directly at the end of a type descriptor. 5% binary size reduction due to fewer relocations.

llvm-svn: 165571

12 years agoAdd extra vim swap file pattern
Michael Liao [Tue, 9 Oct 2012 23:48:58 +0000 (23:48 +0000)]
Add extra vim swap file pattern

llvm-svn: 165570

12 years agoAdd extra vim swap file pattern
Michael Liao [Tue, 9 Oct 2012 23:48:34 +0000 (23:48 +0000)]
Add extra vim swap file pattern

llvm-svn: 165569

12 years agoWhen expanding atomic load arith instructions, do not lose target flags. rdar://12453106
Evan Cheng [Tue, 9 Oct 2012 23:48:33 +0000 (23:48 +0000)]
When expanding atomic load arith instructions, do not lose target flags. rdar://12453106

llvm-svn: 165568

12 years agoThinned the AppleObjCRuntimeV2's class descriptors.
Sean Callanan [Tue, 9 Oct 2012 23:45:42 +0000 (23:45 +0000)]
Thinned the AppleObjCRuntimeV2's class descriptors.
The following are now derived lazily:

- The name of the class (cached);
- the instance size of the class (not cached);

The following have been removed entirely:

- Whether the class is realized.  This is an
  implementation detail.
- The contents of the objc_class object.  That
  object can be read as needed.
- Whether the class is valid.  The fact that
  we vended a class to begin with means it's
  valid.  We will only give up looking parts
  of it up if they are not in the format we
  expect.

llvm-svn: 165567

12 years agomisched: Add computeInstrLatency to TargetSchedModel.
Andrew Trick [Tue, 9 Oct 2012 23:44:32 +0000 (23:44 +0000)]
misched: Add computeInstrLatency to TargetSchedModel.

llvm-svn: 165566

12 years agomisched: Doxument the TargetSchedule API.
Andrew Trick [Tue, 9 Oct 2012 23:44:29 +0000 (23:44 +0000)]
misched: Doxument the TargetSchedule API.

llvm-svn: 165565

12 years agomisched: Allow flags to disable hasInstrSchedModel/hasInstrItineraries for external...
Andrew Trick [Tue, 9 Oct 2012 23:44:26 +0000 (23:44 +0000)]
misched: Allow flags to disable hasInstrSchedModel/hasInstrItineraries for external users of TargetSchedule.

llvm-svn: 165564

12 years agomisched: Remove LoopDependencies heuristic.
Andrew Trick [Tue, 9 Oct 2012 23:44:23 +0000 (23:44 +0000)]
misched: Remove LoopDependencies heuristic.

This wasn't contributing anything significant to postRA heuristics except compile time (by my measurements) and will be replaced by a more general heuristic for cross-region dependencies within the scheduler itself.

llvm-svn: 165563

12 years agoUse the attribute builder to add attributes to call/invoke instruction. No functional...
Bill Wendling [Tue, 9 Oct 2012 23:40:31 +0000 (23:40 +0000)]
Use the attribute builder to add attributes to call/invoke instruction. No functionality change intended.

llvm-svn: 165562

12 years agoInitial assembler implementation of Mips load address macro
Jack Carter [Tue, 9 Oct 2012 23:29:45 +0000 (23:29 +0000)]
Initial assembler implementation of Mips load address macro

This patch provides initial implementation of load address
macro instruction for Mips. We have implemented two kinds
of expansions with their variations depending on the size
of immediate operand:

 1) load address with immediate value directly:
    * la d,j => addiu d,$zero,j   (for -32768 <= j <= 65535)
    * la d,j => lui d,hi16(j)
                ori d,d,lo16(j)   (for any other 32 bit value of j)

 2) load load address with register offset value
    * la d,j(s) => addiu d,s,j     (for -32768 <= j <= 65535)
    * la d,j(s) => lui d,hi16(j)   (for any other 32 bit value of j)
                   ori d,d,lo16(j)
                   addu d,d,s

This patch does not cover the case when the address is loaded
from the value of the label or function.

Contributer: Vladimir Medic
llvm-svn: 165561

12 years agoRework the (de-)serialization of macros, as stored in
Douglas Gregor [Tue, 9 Oct 2012 23:05:51 +0000 (23:05 +0000)]
Rework the (de-)serialization of macros, as stored in
MacroInfo*. Instead of simply dumping an offset into the current file,
give each macro definition a proper ID with all of the standard
modules-remapping facilities. Additionally, when a macro is modified
in a subsequent AST file (e.g., #undef'ing a macro loaded from another
module or from a precompiled header), provide a macro update record
rather than rewriting the entire macro definition. This gives us
greater consistency with the way we handle declarations, and ties
together macro definitions much more cleanly.

Note that we're still not actually deserializing macro history (we
never were), but it's far easy to do properly now.

llvm-svn: 165560

12 years agoAdd count() method to MapVector
Douglas Gregor [Tue, 9 Oct 2012 23:02:47 +0000 (23:02 +0000)]
Add count() method to MapVector

llvm-svn: 165559

12 years agoPeople put pragmas in crazy places; add more handling. PR14046.
Eli Friedman [Tue, 9 Oct 2012 22:46:54 +0000 (22:46 +0000)]
People put pragmas in crazy places; add more handling.  PR14046.

I think our general framework for parser pragmas needs a bit more work,
but I'm not planning on working on it at the moment.

llvm-svn: 165558

12 years ago<rdar://problem/12462575> Refactoring a block of shared code in the NSString data...
Enrico Granata [Tue, 9 Oct 2012 22:44:18 +0000 (22:44 +0000)]
<rdar://problem/12462575> Refactoring a block of shared code in the NSString data formatter

llvm-svn: 165557

12 years agoAdd in some interfaces that will allow easier access to the pointer address space.
Micah Villmow [Tue, 9 Oct 2012 22:27:29 +0000 (22:27 +0000)]
Add in some interfaces that will allow easier access to the pointer address space.

llvm-svn: 165554

12 years agoUse the attribute enums to query if a function has an attribute.
Bill Wendling [Tue, 9 Oct 2012 21:49:51 +0000 (21:49 +0000)]
Use the attribute enums to query if a function has an attribute.

llvm-svn: 165551

12 years agoUse the attribute enums to query if a parameter has an attribute.
Bill Wendling [Tue, 9 Oct 2012 21:38:14 +0000 (21:38 +0000)]
Use the attribute enums to query if a parameter has an attribute.

llvm-svn: 165550

12 years agoCleanup in the AppleObjCRuntimeV2 to make descriptors
Sean Callanan [Tue, 9 Oct 2012 21:21:35 +0000 (21:21 +0000)]
Cleanup in the AppleObjCRuntimeV2 to make descriptors
lighter-weight so that the cache can be populated
faster.

- I Added a ProcessWP to the runtime so I can
  take it out of the individual descriptors, saving
  space;
- I made the constructors for the descriptors
  private so that only the runtime can invoke them;
  and
- I removed the constructor that takes a ValueObject
  since the logic for using a ValueObject is in the
  runtime.

llvm-svn: 165549

12 years agoRevert r165547 to fix build.
Bill Wendling [Tue, 9 Oct 2012 20:56:48 +0000 (20:56 +0000)]
Revert r165547 to fix build.

llvm-svn: 165548

12 years agoUse a single location for calculating the alignments.
Bill Wendling [Tue, 9 Oct 2012 20:55:16 +0000 (20:55 +0000)]
Use a single location for calculating the alignments.

llvm-svn: 165547

12 years agoInitialize the end loc in ObjCInterfaceTypeLoc.
Benjamin Kramer [Tue, 9 Oct 2012 20:49:29 +0000 (20:49 +0000)]
Initialize the end loc in ObjCInterfaceTypeLoc.

Found by valgrind.

llvm-svn: 165546

12 years agoThe clang driver has a fairly fancy support for executing gcc instead of
Rafael Espindola [Tue, 9 Oct 2012 20:46:28 +0000 (20:46 +0000)]
The clang driver has a fairly fancy support for executing gcc instead of
clang itself. This dates back to clang's early days and while it looks like
some of it is still used (for kext for example), other parts are probably dead.

Remove the -ccc-clang-archs option and associated code. I don't think there
is any remaining setup where clang doesn't support an architecture but it can
expect an working gcc cross compiler to be available.

A nice side effect is that tests no longer need to differentiate architectures
that are included in production builds of clang and those that are not.

llvm-svn: 165545

12 years agotblgen: Rename handleDependencies -> createDependencyFile
Sean Silva [Tue, 9 Oct 2012 20:39:28 +0000 (20:39 +0000)]
tblgen: Rename handleDependencies -> createDependencyFile

llvm-svn: 165544

12 years agoRemove this now unused variable macro.
Bill Wendling [Tue, 9 Oct 2012 20:35:11 +0000 (20:35 +0000)]
Remove this now unused variable macro.

llvm-svn: 165543

12 years agotblgen: Move dependency file output to a separate function.
Sean Silva [Tue, 9 Oct 2012 20:29:03 +0000 (20:29 +0000)]
tblgen: Move dependency file output to a separate function.

This keeps it out of the main flow of TableGenMain.

llvm-svn: 165542

12 years agoUse appropriate method calls to get the alignment value.
Bill Wendling [Tue, 9 Oct 2012 20:28:54 +0000 (20:28 +0000)]
Use appropriate method calls to get the alignment value.

llvm-svn: 165541

12 years agoWhitespace.
Chad Rosier [Tue, 9 Oct 2012 20:15:02 +0000 (20:15 +0000)]
Whitespace.

llvm-svn: 165540

12 years agoInline the checks for mutually exclusive attributes since they're used in only one...
Bill Wendling [Tue, 9 Oct 2012 20:11:19 +0000 (20:11 +0000)]
Inline the checks for mutually exclusive attributes since they're used in only one module.

llvm-svn: 165539

12 years agoSimplify the code using SmallVector::append(), as suggested by Benjamin Kramer.
Argyrios Kyrtzidis [Tue, 9 Oct 2012 20:08:43 +0000 (20:08 +0000)]
Simplify the code using SmallVector::append(), as suggested by Benjamin Kramer.

llvm-svn: 165538

12 years ago[driver] Remove redundant cases due to overlapping commits between Ted (r165531,...
Chad Rosier [Tue, 9 Oct 2012 20:01:58 +0000 (20:01 +0000)]
[driver] Remove redundant cases due to overlapping commits between Ted (r165531, 165532) and I
(r165534), but leave the test case in place.

llvm-svn: 165537

12 years ago-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the...
Richard Smith [Tue, 9 Oct 2012 19:52:38 +0000 (19:52 +0000)]
-fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.

llvm-svn: 165536

12 years agoEnable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
Rafael Espindola [Tue, 9 Oct 2012 19:52:10 +0000 (19:52 +0000)]
Enable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplified
the test.

llvm-svn: 165535

12 years ago[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
Chad Rosier [Tue, 9 Oct 2012 19:43:33 +0000 (19:43 +0000)]
[driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
options when clang invokes cc1plus for i386 kexts.
rdar://12459188

llvm-svn: 165534

12 years agoAdd a runtime diagnostics library for Clang's -fcatch-undefined-behavior.
Richard Smith [Tue, 9 Oct 2012 19:34:32 +0000 (19:34 +0000)]
Add a runtime diagnostics library for Clang's -fcatch-undefined-behavior.

llvm-svn: 165533

12 years agoDon't forward -Wenum-conversion to cc1plus.
Ted Kremenek [Tue, 9 Oct 2012 19:29:48 +0000 (19:29 +0000)]
Don't forward -Wenum-conversion to cc1plus.

llvm-svn: 165532

12 years agoDon't forward -Wint-conversion to cc1plus.
Ted Kremenek [Tue, 9 Oct 2012 19:29:46 +0000 (19:29 +0000)]
Don't forward -Wint-conversion to cc1plus.

llvm-svn: 165531

12 years agoMove the 'FunctionOnly' attributes thingy inside of the Attributes class.
Bill Wendling [Tue, 9 Oct 2012 19:01:18 +0000 (19:01 +0000)]
Move the 'FunctionOnly' attributes thingy inside of the Attributes class.

llvm-svn: 165530

12 years agoCreate variable for warning group -Wshorten-64-to-32.
Ted Kremenek [Tue, 9 Oct 2012 18:46:14 +0000 (18:46 +0000)]
Create variable for warning group -Wshorten-64-to-32.

llvm-svn: 165521

12 years agoPatch from Dan Malea to fix a build break I introduced yesterday.
Jason Molenda [Tue, 9 Oct 2012 18:40:44 +0000 (18:40 +0000)]
Patch from Dan Malea to fix a build break I introduced yesterday.
Thanks again Dan!

llvm-svn: 165519

12 years agoMove the functionality that looks for ObjC overridden methods from
Argyrios Kyrtzidis [Tue, 9 Oct 2012 18:19:01 +0000 (18:19 +0000)]
Move the functionality that looks for ObjC overridden methods from
ASTContext to the ObjCMethodDecl, and have the more generic
ASTContext::getOverriddenMethods() use the ObjCMethodDecl::getOverriddenMethods()
function.

llvm-svn: 165518

12 years agoNot everyone uses C++11, apparently
Douglas Gregor [Tue, 9 Oct 2012 17:51:56 +0000 (17:51 +0000)]
Not everyone uses C++11, apparently

llvm-svn: 165517

12 years agoChanges to clean up the runtime and how the ISA caches are managed.
Greg Clayton [Tue, 9 Oct 2012 17:51:53 +0000 (17:51 +0000)]
Changes to clean up the runtime and how the ISA caches are managed.

llvm-svn: 165516

12 years agoMake the order of visitation of the pending bodies in the AST reader
Douglas Gregor [Tue, 9 Oct 2012 17:50:23 +0000 (17:50 +0000)]
Make the order of visitation of the pending bodies in the AST reader
deterministic.

llvm-svn: 165515

12 years agoAllow MapVector clients to specify the map and vector types, and add a
Douglas Gregor [Tue, 9 Oct 2012 17:49:42 +0000 (17:49 +0000)]
Allow MapVector clients to specify the map and vector types, and add a
clear() method.

llvm-svn: 165514

12 years agoWhen we load a function or method body from an AST file, we check
Douglas Gregor [Tue, 9 Oct 2012 17:21:28 +0000 (17:21 +0000)]
When we load a function or method body from an AST file, we check
whether that function/method already has a body (loaded from some
other AST file), as introduced in r165137. Delay this check until
after the redeclaration chains have been wired up.

While I'm here, make the loading of method bodies lazy.

llvm-svn: 165513

12 years agoMore descriptive, doxygen-ed comments
Michael Ilseman [Tue, 9 Oct 2012 17:05:59 +0000 (17:05 +0000)]
More descriptive, doxygen-ed comments

llvm-svn: 165512

12 years agotblgen: Remove pointless method call.
Sean Silva [Tue, 9 Oct 2012 17:03:11 +0000 (17:03 +0000)]
tblgen: Remove pointless method call.

llvm-svn: 165511

12 years agoNew EarlyCSE tests for CSE-ing across commutativity.
Michael Ilseman [Tue, 9 Oct 2012 16:58:13 +0000 (16:58 +0000)]
New EarlyCSE tests for CSE-ing across commutativity.

llvm-svn: 165510

12 years agoUpdate EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashin...
Michael Ilseman [Tue, 9 Oct 2012 16:57:38 +0000 (16:57 +0000)]
Update EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashing and equality to allow for equality modulo commutativity for binary ops, and comparisons with swapping of predicates.

llvm-svn: 165509

12 years agoNew value_op_iterator for User. This allows other code to iterate over the User's...
Michael Ilseman [Tue, 9 Oct 2012 16:55:14 +0000 (16:55 +0000)]
New value_op_iterator for User. This allows other code to iterate over the User's operands directly as values, which can be convenient.

llvm-svn: 165508

12 years agoFixed the redo.py script to emit correct arch and compiler options after dotest.py...
Greg Clayton [Tue, 9 Oct 2012 16:54:55 +0000 (16:54 +0000)]
Fixed the redo.py script to emit correct arch and compiler options after dotest.py was switched over to use argparse.

llvm-svn: 165507

12 years agoImprovements to MIPS64 assembler:
David Chisnall [Tue, 9 Oct 2012 16:27:43 +0000 (16:27 +0000)]
Improvements to MIPS64 assembler:

- Teach it about dadd[i] instructions and move pseudo-instruction
- Make it parse the register names correctly (for N32 / N64)

llvm-svn: 165506

12 years agoAdd in the first step of the multiple pointer support. This adds in support to the...
Micah Villmow [Tue, 9 Oct 2012 16:06:12 +0000 (16:06 +0000)]
Add in the first step of the multiple pointer support. This adds in support to the data layout for specifying a per address space pointer size.
The next step is to update the optimizers to allow them to optimize the different address spaces with this information.

llvm-svn: 165505

12 years agoDetermine supported archs for compiler-rt libraries on Linux by trying to compile...
Alexey Samsonov [Tue, 9 Oct 2012 16:05:50 +0000 (16:05 +0000)]
Determine supported archs for compiler-rt libraries on Linux by trying to compile a simple executable

llvm-svn: 165504

12 years agoFixup for r165097: build 32-bit ASan compiler-rt library on 64-bit Linux only if...
Alexey Samsonov [Tue, 9 Oct 2012 16:03:52 +0000 (16:03 +0000)]
Fixup for r165097: build 32-bit ASan compiler-rt library on 64-bit Linux only if just-built clang can build simple 32-bit executables

llvm-svn: 165503

12 years agoIf a macro has been #undef'd in a precompiled header, we still need to
Douglas Gregor [Tue, 9 Oct 2012 16:01:50 +0000 (16:01 +0000)]
If a macro has been #undef'd in a precompiled header, we still need to
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.

Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.

llvm-svn: 165502

12 years agoClearing a SmallPtrSet is still expensive, split it out from OverloadCandidateSet...
Benjamin Kramer [Tue, 9 Oct 2012 15:52:25 +0000 (15:52 +0000)]
Clearing a SmallPtrSet is still expensive, split it out from OverloadCandidateSet::clear and don't do it on destruction.

llvm-svn: 165501

12 years agoFixup for r165490: Use DenseMap instead of std::map. Simplify the loop in CollectFunc...
Alexey Samsonov [Tue, 9 Oct 2012 10:34:52 +0000 (10:34 +0000)]
Fixup for r165490: Use DenseMap instead of std::map. Simplify the loop in CollectFunctionDIs.

llvm-svn: 165498

12 years agoMove the 'ParameterOnly' variable inside of the Attributes class and make it a method.
Bill Wendling [Tue, 9 Oct 2012 09:51:10 +0000 (09:51 +0000)]
Move the 'ParameterOnly' variable inside of the Attributes class and make it a method.

llvm-svn: 165497

12 years agoRemove the now dead VarArgsIncompatible variable.
Bill Wendling [Tue, 9 Oct 2012 09:33:01 +0000 (09:33 +0000)]
Remove the now dead VarArgsIncompatible variable.

llvm-svn: 165496

12 years agoUse the enum value of the attributes when removing them from the attributes builder.
Bill Wendling [Tue, 9 Oct 2012 09:17:28 +0000 (09:17 +0000)]
Use the enum value of the attributes when removing them from the attributes builder.

llvm-svn: 165495

12 years agoUse the enum value of the attributes when adding them to the attributes builder.
Bill Wendling [Tue, 9 Oct 2012 09:11:20 +0000 (09:11 +0000)]
Use the enum value of the attributes when adding them to the attributes builder.

llvm-svn: 165494

12 years ago[Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro
Alexey Samsonov [Tue, 9 Oct 2012 08:51:08 +0000 (08:51 +0000)]
[Sanitizer] Remove unneeded returns after UNIMPLEMENTED macro

llvm-svn: 165493

12 years ago[Sanitizer] Add UNREACHABLE(msg) macro
Alexey Samsonov [Tue, 9 Oct 2012 08:42:07 +0000 (08:42 +0000)]
[Sanitizer] Add UNREACHABLE(msg) macro

llvm-svn: 165492

12 years agoFix PR14016.
Alexey Samsonov [Tue, 9 Oct 2012 08:13:15 +0000 (08:13 +0000)]
Fix PR14016.
DeadArgumentElimination pass can replace one LLVM function with another,
invalidating a pointer stored in debug info metadata entry for this function.
To fix this, we collect debug info descriptors for functions before
running a DeadArgumentElimination pass and "patch" pointers in metadata nodes
if we replace a function.

llvm-svn: 165490

12 years agoWe use the enums to query whether an Attributes object has that attribute. The
Bill Wendling [Tue, 9 Oct 2012 07:45:26 +0000 (07:45 +0000)]
We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165489

12 years agoCreate enums for the different attributes.
Bill Wendling [Tue, 9 Oct 2012 07:45:08 +0000 (07:45 +0000)]
Create enums for the different attributes.

We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.

llvm-svn: 165488

12 years agoCXXMethodDecl::isConst() and CXXMethodDecl::isVolatile() can be const methods
Arnaud A. de Grandmaison [Tue, 9 Oct 2012 07:09:56 +0000 (07:09 +0000)]
CXXMethodDecl::isConst() and CXXMethodDecl::isVolatile() can be const methods

Patch by: Laszlo Nagy

llvm-svn: 165486

12 years agoRemove some dead methods.
Bill Wendling [Tue, 9 Oct 2012 05:54:39 +0000 (05:54 +0000)]
Remove some dead methods.

llvm-svn: 165485

12 years agoRemove ifdef'd code.
Bill Wendling [Tue, 9 Oct 2012 05:36:15 +0000 (05:36 +0000)]
Remove ifdef'd code.

llvm-svn: 165484

12 years agoSeparate AVXCC and SSECC printing for cmpps/pd/ss/sd and add masking before the switc...
Craig Topper [Tue, 9 Oct 2012 05:26:13 +0000 (05:26 +0000)]
Separate AVXCC and SSECC printing for cmpps/pd/ss/sd and add masking before the switch statement. This keeps the unreachable default case from being hit if the instruction was created with an intrinsic with too large of an immediate.

llvm-svn: 165483

12 years agoRevert r117093, "test/Makefile: Force lit -j1 on Cygwin."
NAKAMURA Takumi [Tue, 9 Oct 2012 05:07:18 +0000 (05:07 +0000)]
Revert r117093, "test/Makefile: Force lit -j1 on Cygwin."

lit -jN works on cygwin in most cases, but still sometimes I can see stalls with iterative run on the buildbot.

llvm-svn: 165482

12 years agoTrivial change to the README, mainly to test commit access.
Sameer Sahasrabuddhe [Tue, 9 Oct 2012 04:59:42 +0000 (04:59 +0000)]
Trivial change to the README, mainly to test commit access.

llvm-svn: 165481

12 years agoIn parseMSRMaskOperand, add an explicit check for the operand being an identifier...
Craig Topper [Tue, 9 Oct 2012 04:55:28 +0000 (04:55 +0000)]
In parseMSRMaskOperand, add an explicit check for the operand being an identifier instead of just having an assert.

llvm-svn: 165480

12 years agoRemove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to the other...
Craig Topper [Tue, 9 Oct 2012 04:23:49 +0000 (04:23 +0000)]
Remove some dead code from ARMAsmPrinter. Add virtual and LLVM_OVERRIDE to the other methods. Mark some of the helper methods as private.

llvm-svn: 165479

12 years agoRemove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords...
Craig Topper [Tue, 9 Oct 2012 03:50:37 +0000 (03:50 +0000)]
Remove some unused code in the X86AsmPrinter. Add LLVM_OVERRIDE and virtual keywords to the remaining interface methods.

llvm-svn: 165478