Commit Graph

146318 Commits

Author SHA1 Message Date
Michael Gottesman 46ebe53ead Added back in the test for arc-annotations.
The test was removed since I had not turned off the test during release
builds. This fails since ARC annotations support  is conditionally
compiled out during release builds. I added the proper requires header
to assuage this issue.

llvm-svn: 178101
2013-03-27 00:09:58 +00:00
David Blaikie 2398f30115 Update debug info test for schema change made to LLVM.
This accounts for the addition of another field to DIScopes that will be used
to store a list of DIImportedModules in the future.

llvm-svn: 178100
2013-03-27 00:08:24 +00:00
David Blaikie a26d70358f Adding DIImportedModules to DIScopes.
This is just the basic groundwork for supporting DW_TAG_imported_module but I
wanted to commit this before pushing support further into Clang or LLVM so that
this rather churny change is isolated from the rest of the work. The major
churn here is obviously adding another field (within the common DIScope prefix)
to all DIScopes (files, classes, namespaces, lexical scopes, etc). This should
be the last big churny change needed for DW_TAG_imported_module/using directive
support/PR14606.

llvm-svn: 178099
2013-03-27 00:07:26 +00:00
John McCall f2abe19dbb Make the -Wreinterpret-base-class logic safe against invalid
declarations at any point. Patch by Alexander Zinenko, and
report by Richard Smith.

llvm-svn: 178098
2013-03-27 00:03:48 +00:00
Ted Kremenek 65d635775d Split "incomplete implementation" warnings for ObjC into separate warnings.
Previously all unimplemented methods for a class were grouped under
a single warning, with all the unimplemented methods mentioned
as notes.  Based on feedback from users, most users would like
a separate warning for each method, with a note pointing back to
the original method declaration.

Implements <rdar://problem/13350414>

llvm-svn: 178097
2013-03-27 00:02:21 +00:00
Hal Finkel a7b0630ba8 Don't spill PPC VRSAVE on non-Darwin (even in SjLj)
As Bill Schmidt pointed out to me, only on Darwin do we need to spill/restore
VRSAVE in the SjLj code. For non-Darwin, don't spill/restore VRSAVE (and I've
added some asserts to make sure that we're not).

As it turns out, we're not currently handling the Darwin case correctly (I've
added a FIXME in the test case). I've tried adding various implied register
definitions/uses to force the spill without success, so I'll need to address
this later.

llvm-svn: 178096
2013-03-27 00:02:20 +00:00
Douglas Gregor 6fa6ab0675 <rdar://problem/13278115> Improve diagnostic when failing to bind an rvalue reference to an lvalue of compatible type.
llvm-svn: 178095
2013-03-26 23:59:23 +00:00
Anna Zaks fb0a6329bd [analyzer] Better test for r178063.
Jordan pointed out that my previously committed test was bogus.

llvm-svn: 178094
2013-03-26 23:58:52 +00:00
Anna Zaks bd8f60d6d1 [analyzer] Make sure IDC works for ‘NSContainer value/key is nil’ checks.
Register the nil tracking visitors with the region and refactor trackNullOrUndefValue a bit.

Also adds the cast and paren stripping before checking if the value is an OpaqueValueExpr
or ExprWithCleanups.

llvm-svn: 178093
2013-03-26 23:58:49 +00:00
David Blaikie 49ae6a7cf8 Remove magic number usage from CGDebugInfo with new DICompositeType::setContainingType
llvm-svn: 178092
2013-03-26 23:47:35 +00:00
David Blaikie a7310a3d1b Make DIBuilder::createClassType more type safe by returning DICompositeType rather than DIType
llvm-svn: 178091
2013-03-26 23:46:39 +00:00
David Blaikie fe6db31ce8 DebugInfo: more support for mutating DICompositeType to reduce magic number usage in Clang
llvm-svn: 178090
2013-03-26 23:46:36 +00:00
Chad Rosier d14757751f [driver] Do not generate crash diagnostics if the compilation command failed
to execute as the crash will surely reoccur while generating the diagnostics.
rdar://13362359

llvm-svn: 178089
2013-03-26 23:41:30 +00:00
Douglas Gregor 45bb4834e9 <rdar://problem/13267210> Ensure that Sema::CompareReferenceRelationship returns consistent results with invalid types.
When Sema::RequireCompleteType() is given a class template
specialization type that then fails to instantiate, it returns
'true'. On subsequent invocations, it can return false. Make sure that
this difference doesn't change the result of
Sema::CompareReferenceRelationship, which is expected to remain stable
while we're checking an initialization sequence.

llvm-svn: 178088
2013-03-26 23:36:30 +00:00
Chad Rosier 654190a12d Add a boolean parameter to the ExecuteAndWait static function to indicated
if execution failed.  ExecuteAndWait returns -1 upon an execution failure, but
checking the return value isn't sufficient because the wait command may
return -1 as well.  This new parameter is to be used by the clang driver in a
subsequent commit.
Part of rdar://13362359

llvm-svn: 178087
2013-03-26 23:35:00 +00:00
Chad Rosier ab003df656 Remove a FIXME that's not planned to be fixed. We only generated crash
diagnostics for the first failing command.

llvm-svn: 178086
2013-03-26 23:25:41 +00:00
Greg Clayton 2d7d09231e Cleaned up how LLDB.framework was being linked to and also how the target dependencies.
llvm-svn: 178085
2013-03-26 22:52:20 +00:00
Bill Wendling 5aa82397e8 Use the full path when outputting the `.gcda' file.
If we compile a single source program, the `.gcda' file will be generated where
the program was executed. This isn't desirable, because that place may be at an
unpredictable place (the program could call `chdir' for instance).

Instead, we will output the `.gcda' file in the same place we output the `.gcno'
file. I.e., the directory where the executable was generated. This matches GCC's
behavior.

<rdar://problem/13061072> & PR11809

llvm-svn: 178084
2013-03-26 22:47:50 +00:00
Michael Liao 03f9ad0e67 Add XTEST codegen support
llvm-svn: 178083
2013-03-26 22:47:01 +00:00
Michael Liao e344ec919f Add HLE target feature
llvm-svn: 178082
2013-03-26 22:46:02 +00:00
Douglas Gregor 89c0a914ec <rdar://problem/13473493> Handle 'this->' insertion recovery within trailing return types.
llvm-svn: 178081
2013-03-26 22:43:55 +00:00
Jakob Stoklund Olesen 1ac7e662d4 Enable SandyBridgeModel for all modern Intel P6 descendants.
All Intel CPUs since Yonah look a lot alike, at least at the granularity
of the scheduling models. We can add more accurate models for
processors that aren't Sandy Bridge if required. Haswell will probably
need its own.

The Atom processor and anything based on NetBurst is completely
different. So are the non-Intel chips.

llvm-svn: 178080
2013-03-26 22:19:12 +00:00
David Blaikie 2ebf08ecbd Debug Info: remove use of magic numbers to tweak specific debug info metadata fields
llvm-svn: 178079
2013-03-26 22:09:53 +00:00
David Blaikie d03326b75a Debug Info: Provide a means to update the members of a composite type
This will be used to factor out some uses of magic number operand offsets
inside Clang where these fields were updated in an effort to resolve forward
declarations/circular references.

llvm-svn: 178078
2013-03-26 21:59:17 +00:00
Hal Finkel 567fa62ddc Restore real bit lengths on PPC register numbers
As suggested by Bill Schmidt (in reviewing r178067), use the real register
number bit lengths (which is self-documenting, and prevents using illegal
numbers), and set only the relevant bits in HWEncoding (which defaults to 0).

No functionality change intended.

llvm-svn: 178077
2013-03-26 21:50:26 +00:00
Enrico Granata b65b3030b6 <rdar://problem/13339196>
The algorithm to access an item in a __NSArrayM was not reacting properly to deletions
The fix is to use a smarter formula that accounts for items shifting and the resulting notion of offsets in the table

llvm-svn: 178076
2013-03-26 21:44:13 +00:00
Howard Hinnant 5a13d8dcea Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point.
llvm-svn: 178075
2013-03-26 21:40:54 +00:00
Andrew Trick e97978f94c TableGen SubtargetEmitter fix to allow A9 and Swift to coexist.
Allow variants to be defined only for some processors on a target.

llvm-svn: 178074
2013-03-26 21:36:39 +00:00
Hal Finkel 1fa2f945ea Fix the register scavenger for targets that provide custom spilling
As pointed out by Richard Sandiford, my recent updates to the register
scavenger broke targets that use custom spilling (because the new code assumed
that if there were no valid spill slots, than spilling would be impossible).

I don't have a test case, but it should be possible to create one for Thumb 1,
Mips 16, etc.

llvm-svn: 178073
2013-03-26 21:20:15 +00:00
Enrico Granata 3f617d25d6 <rdar://problem/13246939>
Make format uint64_t[] actually work as designed

llvm-svn: 178072
2013-03-26 21:13:57 +00:00
Greg Clayton 365fe21947 Add a way to dump a ClangASTType to stdout for debugging purposes.
llvm-svn: 178071
2013-03-26 21:01:37 +00:00
Greg Clayton ba752b9bfd Trim the output build folder a bit to it isn't so large.
llvm-svn: 178070
2013-03-26 21:00:56 +00:00
Greg Clayton 2d95f35748 A few more tweaks to the python perf tests. Now there is a MemoryMeasurement.
llvm-svn: 178069
2013-03-26 21:00:29 +00:00
Greg Clayton 00ec049050 Clean up logging a bit to not log when a command pipe is opened when “lldb object” logging is on.
llvm-svn: 178068
2013-03-26 20:53:56 +00:00
Hal Finkel feea653974 PPC: Use HWEncoding and TRI->getEncodingValue
As pointed out by Jakob, we don't need to maintain a separate
register-numbering table. Instead we should let TableGen generate the table for
us from the information (already present) in PPCRegisterInfo.td.
TRI->getEncodingValue is now used to access register-encoding values.

No functionality change intended.

llvm-svn: 178067
2013-03-26 20:08:20 +00:00
NAKAMURA Takumi 3234178bf9 R600/SIMCCodeEmitter.cpp: Prune a couple of unused members, STI and Ctx. [-Wunused-private-field]
llvm-svn: 178065
2013-03-26 19:42:48 +00:00
Howard Hinnant cd4a9fd301 Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576.
llvm-svn: 178064
2013-03-26 19:04:56 +00:00
Anna Zaks b13d21b6e1 [analyzer] Change inlining policy to inline small functions when reanalyzing ObjC methods as top level.
This allows us to better reason about(inline) small wrapper functions.

llvm-svn: 178063
2013-03-26 18:57:58 +00:00
Anna Zaks ea47959c2f [analyzer] micro optimization as per Jordan’s feedback on r177905.
llvm-svn: 178062
2013-03-26 18:57:51 +00:00
NAKAMURA Takumi 719f8584f2 clang/test/CodeGenCXX/debug-info-namespace.cpp: Disable it on non-bash lit for now.
With dosish filename, it misgenerates an improper extra entry.

!1 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX/debug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 = metadata !{metadata !"E:\5Cllvm\5Cllvm-project\5Cclang\5Ctest\5CCodeGenCXX\5Cdebug-info-namespace.cpp", metadata !"E:\5Cllvm\5Cbuild\5Cninja-win32-vs11\5Ctools\5Cclang\5Ctest\5CCodeGenCXX"}

!8 is unexpected.

llvm-svn: 178061
2013-03-26 18:57:40 +00:00
Hal Finkel 0dfbb05aff Use multiple virtual registers in PPC CR spilling
Now that the register scavenger can support multiple spill slots, and PEI can
use virtual-register-based scavenging for multiple simultaneous registers, we
can use a virtual register for the transfer register in the CR spilling code.

This should eliminate the last place (outside of the prologue/epilogue) where
we depend on the unconditional availability of the r0 register. We will soon be
able to allocate it (in a somewhat restricted sense) as a GPR.

llvm-svn: 178060
2013-03-26 18:57:22 +00:00
Hal Finkel d8a423cd71 Update PPCRegisterInfo's use of virtual registers to be SSA
PPC's use of PEI's virtual-register-based scavenging functionality had
redefined the virtual registers (it was non-SSA). Now that PEI supports
dealing with instructions with multiple virtual registers, this can be
cleanup up to use multiple virtual registers and keep SSA form.

No functionality change intended.

llvm-svn: 178059
2013-03-26 18:57:20 +00:00
Hal Finkel 4e05788cc3 Update PEI's virtual-register-based scavenging to support multiple simultaneous mappings
The previous algorithm could not deal properly with scavenging multiple virtual
registers because it kept only one live virtual -> physical mapping (and
iterated through operands in order). Now we don't maintain a current mapping,
but rather use replaceRegWith to completely remove the virtual register as
soon as the mapping is established.

In order to allow the register scavenger to return a physical register killed
by an instruction for definition by that same instruction, we now call
RS->forward(I) prior to eliminating virtual registers defined in I. This
requires a minor update to forward to ignore virtual registers.

These new features will be tested in forthcoming commits.

llvm-svn: 178058
2013-03-26 18:56:54 +00:00
Enrico Granata 7c0788b2d9 Data formatters cleanup:
- Making an error message more consistent
- Ensuring the element size is not zero before using it in a modulus
- Properly using target settings to cap the std::list element count
- Removing spurious element size calculations that were unused
- Removing spurious capping in std::map

llvm-svn: 178057
2013-03-26 18:55:08 +00:00
Greg Clayton bb1beaa220 Don't crash when we have an element size of zero.
llvm-svn: 178056
2013-03-26 18:42:13 +00:00
Rafael Espindola 609f5d98d4 Remove useGlobalsForAutomaticVariables.
It is unused since pic support went away.

llvm-svn: 178055
2013-03-26 18:41:47 +00:00
Reid Kleckner 6a476082a6 [ms-cxxabi] Give the MS inheritance attributes a base class
Required making a handful of changes to the table generator.  Also adds
an unspecified inheritance attribute.  This opens the path for us to
apply these attributes to C++ records implicitly.

llvm-svn: 178054
2013-03-26 18:30:28 +00:00
Manman Ren a8540819df Fix uninitialized read of CalleeWithThisReturn.
Initialize CalleeWithThisReturn to 0 in the constructor.
Also revert r170815 since checking CalleeWithThisReturn is faster.

PR15598

llvm-svn: 178053
2013-03-26 18:29:15 +00:00
Jim Ingham a89be91f2e That wasn't a typo, if the short letter option is from a non-obvious source, I capitolize it in the help as an aid to memory.
llvm-svn: 178052
2013-03-26 18:29:03 +00:00
Jakob Stoklund Olesen e440d476ee Annotate the remaining x86 instructions with SchedRW lists.
Now all x86 instructions that have itinerary classes also have SchedRW
lists. This is required before the new scheduling models can be used.

There are still unannotated instructions remaining, but they don't have
itinerary classes either.

llvm-svn: 178051
2013-03-26 18:24:22 +00:00