platform/upstream/llvm.git
11 years agoImprove -Wtautological-constant-out-of-range-compare by taking into account
Richard Trieu [Wed, 14 Nov 2012 22:50:24 +0000 (22:50 +0000)]
Improve -Wtautological-constant-out-of-range-compare by taking into account
type conversion between integers.  This allows the warning to be more accurate.

Also, turned the warning off in an analyzer test.  The relavent test cases
are covered by the tests in Sema.

llvm-svn: 167992

11 years agoUse reserve() to avoid vector reallocation.
Jakub Staszak [Wed, 14 Nov 2012 22:42:17 +0000 (22:42 +0000)]
Use reserve() to avoid vector reallocation.

llvm-svn: 167991

11 years agoTeach the AST importer to merge enumerator constants. Fixes
Douglas Gregor [Wed, 14 Nov 2012 22:29:20 +0000 (22:29 +0000)]
Teach the AST importer to merge enumerator constants. Fixes
<rdar://problem/12676166>, and tested on the LLDB side of the world.

llvm-svn: 167990

11 years agoMake sure to not get AVX code on an AVX-capable host. Revealed in r167967.
Jakub Staszak [Wed, 14 Nov 2012 22:24:01 +0000 (22:24 +0000)]
Make sure to not get AVX code on an AVX-capable host. Revealed in r167967.

llvm-svn: 167989

11 years agotest/CodeGen/Hexagon/postinc-load.ll: Suppress it for now. It triggered the failure...
NAKAMURA Takumi [Wed, 14 Nov 2012 22:22:37 +0000 (22:22 +0000)]
test/CodeGen/Hexagon/postinc-load.ll: Suppress it for now. It triggered the failure on i686 hosts.

llvm-svn: 167988

11 years agoFew more small CellSPU removals.
Eric Christopher [Wed, 14 Nov 2012 22:13:56 +0000 (22:13 +0000)]
Few more small CellSPU removals.

llvm-svn: 167987

11 years agoFix CMake build.
Eric Christopher [Wed, 14 Nov 2012 22:10:47 +0000 (22:10 +0000)]
Fix CMake build.

llvm-svn: 167986

11 years agoWhen evaluating variably modified types for function parameters, dig out the
Eli Friedman [Wed, 14 Nov 2012 22:09:59 +0000 (22:09 +0000)]
When evaluating variably modified types for function parameters, dig out the
type as written from the ParmVarDecl; it's unclear whether the standard
(C99 6.9.1p10) requires this, but we're following the precedent set by gcc,
and hopefully nobody will ever ask about this again.

PR9559 / <rdar://problem/12621983>.

llvm-svn: 167985

11 years agoRemove the CellSPU port.
Eric Christopher [Wed, 14 Nov 2012 22:09:20 +0000 (22:09 +0000)]
Remove the CellSPU port.

Approved by Chris Lattner.

llvm-svn: 167984

11 years agoRemove the cellspu port.
Eric Christopher [Wed, 14 Nov 2012 22:08:59 +0000 (22:08 +0000)]
Remove the cellspu port.

Approved by Chris Lattner.

llvm-svn: 167983

11 years agoParseTemplate.cpp: Prune obsolete descriptions in ParseSingleDeclarationAfterTemplate...
NAKAMURA Takumi [Wed, 14 Nov 2012 21:45:43 +0000 (21:45 +0000)]
ParseTemplate.cpp: Prune obsolete descriptions in ParseSingleDeclarationAfterTemplate(), for now. [-Wdocumentation]

/// \param TemplateParams if non-NULL, the template parameter lists
/// that preceded this declaration. In this case, the declaration is a
/// template declaration, out-of-line definition of a template, or an
/// explicit template specialization. When NULL, the declaration is an
/// explicit template instantiation.
///
/// \param TemplateLoc when TemplateParams is NULL, the location of
/// the 'template' keyword that indicates that we have an explicit
/// template instantiation.

llvm-svn: 167982

11 years ago[analyzer] Ensure that CmpRuns recursively walks the output directory.
Anna Zaks [Wed, 14 Nov 2012 21:32:16 +0000 (21:32 +0000)]
[analyzer] Ensure that CmpRuns recursively walks the output directory.

llvm-svn: 167981

11 years agoRestrict optimized __pad_and_output implementation detail to desired releases.
Howard Hinnant [Wed, 14 Nov 2012 21:17:15 +0000 (21:17 +0000)]
Restrict optimized __pad_and_output implementation detail to desired releases.

llvm-svn: 167980

11 years agodocs: Sphinxify TestingGuide
Sean Silva [Wed, 14 Nov 2012 21:09:30 +0000 (21:09 +0000)]
docs: Sphinxify TestingGuide

llvm-svn: 167979

11 years agoSupport for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
Alexander Kornienko [Wed, 14 Nov 2012 21:07:37 +0000 (21:07 +0000)]
Support for [[@LINE]], [[@LINE+<offset>]], [[@LINE-<offset>]] expressions in
FileCheck.

llvm-svn: 167978

11 years agoFix invalid asserts, use llvm_unreachable instead.
Jakub Staszak [Wed, 14 Nov 2012 21:03:40 +0000 (21:03 +0000)]
Fix invalid asserts, use llvm_unreachable instead.

llvm-svn: 167976

11 years agollvm/test/CodeGen/X86/memset.ll: FileCheck-ize, and add another case on +avx.
NAKAMURA Takumi [Wed, 14 Nov 2012 21:01:40 +0000 (21:01 +0000)]
llvm/test/CodeGen/X86/memset.ll: FileCheck-ize, and add another case on +avx.

llvm-svn: 167975

11 years agoAdded multiclass for post-increment load instructions.
Jyotsna Verma [Wed, 14 Nov 2012 20:38:48 +0000 (20:38 +0000)]
Added multiclass for post-increment load instructions.

llvm-svn: 167974

11 years agoForce CPU in test so we don't accidentally get AVX code on an AVX-capable host.
Benjamin Kramer [Wed, 14 Nov 2012 20:31:42 +0000 (20:31 +0000)]
Force CPU in test so we don't accidentally get AVX code on an AVX-capable host.

llvm-svn: 167973

11 years agocanJoinPhys method doesn't modify CoalescerPair. Make it const.
Jakub Staszak [Wed, 14 Nov 2012 20:31:04 +0000 (20:31 +0000)]
canJoinPhys method doesn't modify CoalescerPair. Make it const.

llvm-svn: 167972

11 years agoAdded %(line), %(line+<number>), %(line-<number>) substitutions to lit
Alexander Kornienko [Wed, 14 Nov 2012 20:26:19 +0000 (20:26 +0000)]
Added %(line), %(line+<number>), %(line-<number>) substitutions to lit

llvm-svn: 167971

11 years agoRemove dead code.
Chad Rosier [Wed, 14 Nov 2012 20:25:37 +0000 (20:25 +0000)]
Remove dead code.

llvm-svn: 167970

11 years agoFix comment.
Jakub Staszak [Wed, 14 Nov 2012 20:21:29 +0000 (20:21 +0000)]
Fix comment.

llvm-svn: 167969

11 years agoRemove DOS line endings.
Jakub Staszak [Wed, 14 Nov 2012 20:18:34 +0000 (20:18 +0000)]
Remove DOS line endings.

llvm-svn: 167968

11 years agoX86: Enable SSE memory intrinsics even when stack alignment is less than 16 bytes.
Benjamin Kramer [Wed, 14 Nov 2012 20:08:40 +0000 (20:08 +0000)]
X86: Enable SSE memory intrinsics even when stack alignment is less than 16 bytes.

The stack realignment code was fixed to work when there is stack realignment and
a dynamic alloca is present so this shouldn't cause correctness issues anymore.

Note that this also enables generation of AVX instructions for memset
under the assumptions:
- Unaligned loads/stores are always fast on CPUs supporting AVX
- AVX is not slower than SSE
We may need some tweaked heuristics if one of those assumptions turns out not to
be true.

Effectively reverts r58317. Part of PR2962.

llvm-svn: 167967

11 years agoReplace std::vector -> SmallVector in BBVectorize
Hal Finkel [Wed, 14 Nov 2012 19:53:27 +0000 (19:53 +0000)]
Replace std::vector -> SmallVector in BBVectorize

For now, this uses 8 on-stack elements. I'll need to do some profiling
to see if this is the best number.

Pointed out by Jakob in post-commit review.

llvm-svn: 167966

11 years agoUpdate my email address and update the code ownership
Nadav Rotem [Wed, 14 Nov 2012 19:47:48 +0000 (19:47 +0000)]
Update my email address and update the code ownership

llvm-svn: 167965

11 years agoFileCheck.rst: change formatting of code-like constructs to use a monospaced
Dmitri Gribenko [Wed, 14 Nov 2012 19:42:32 +0000 (19:42 +0000)]
FileCheck.rst: change formatting of code-like constructs to use a monospaced
font.  These were formatted in bold, but that's not correct.

llvm-svn: 167964

11 years agoThe code pattern "imm0_255_neg" is used for checking if an immediate value is a small...
Nadav Rotem [Wed, 14 Nov 2012 19:39:15 +0000 (19:39 +0000)]
The code pattern "imm0_255_neg" is used for checking if an immediate value is a small negative number.
This patch changes the definition of negative from -0..-255 to -1..-255. I am changing this because of
a bug that we had in some of the patterns that assumed that "subs" of zero does not set the carry flag.

rdar://12028498

llvm-svn: 167963

11 years agoAdd myself as code owner for NVPTX target
Justin Holewinski [Wed, 14 Nov 2012 19:36:27 +0000 (19:36 +0000)]
Add myself as code owner for NVPTX target

llvm-svn: 167962

11 years agodocs: nuke GCCFEBuildInstrs.html
Sean Silva [Wed, 14 Nov 2012 19:34:48 +0000 (19:34 +0000)]
docs: nuke GCCFEBuildInstrs.html

llvm-svn: 167961

11 years ago[NVPTX] Implement custom lowering of loads/stores for i1
Justin Holewinski [Wed, 14 Nov 2012 19:19:16 +0000 (19:19 +0000)]
[NVPTX] Implement custom lowering of loads/stores for i1

Loads from i1 become loads from i8 followed by trunc
Stores to i1 become zext to i8 followed by store to i8

Fixes PR13291

llvm-svn: 167948

11 years agoFix comment
Anton Korobeynikov [Wed, 14 Nov 2012 19:17:44 +0000 (19:17 +0000)]
Fix comment

llvm-svn: 167947

11 years agoIn ExpressionEvaluationContextRecord manage LambdaMangle with a shared
Argyrios Kyrtzidis [Wed, 14 Nov 2012 19:16:13 +0000 (19:16 +0000)]
In ExpressionEvaluationContextRecord manage LambdaMangle with a shared
pointer, otherwise we will double free it when ExpressionEvaluationContextRecord
gets copied.

Fixes crash in rdar://12645424 & http://llvm.org/PR14252

llvm-svn: 167946

11 years agoFix really stupid ARM EHABI info generation bug: we should not emit
Anton Korobeynikov [Wed, 14 Nov 2012 19:13:30 +0000 (19:13 +0000)]
Fix really stupid ARM EHABI info generation bug: we should not emit
eh table and handler data if there are no landing pads in the function.
Patch by Logan Chien with some cleanups from me.

llvm-svn: 167945

11 years agoClaim ownership.
Chad Rosier [Wed, 14 Nov 2012 18:43:21 +0000 (18:43 +0000)]
Claim ownership.

llvm-svn: 167943

11 years agoFix the largest offender of determinism in BBVectorize
Hal Finkel [Wed, 14 Nov 2012 18:38:11 +0000 (18:38 +0000)]
Fix the largest offender of determinism in BBVectorize

Iterating over the children of each node in the potential vectorization
plan must happen in a deterministic order (because it affects which children
are erased when two children conflict). There was no need for this data
structure to be a map in the first place, so replacing it with a vector
is a small change.

I believe that this was the last remaining instance if iterating over the
elements of a Dense* container where the iteration order could matter.
There are some remaining iterations over std::*map containers where the order
might matter, but so long as the Value* for instructions in a block increase
with the order of the instructions in the block (or decrease) monotonically,
then this will appear to be deterministic.

llvm-svn: 167942

11 years agoSort the code owner list alphabetically. Add myself as lib/DebugInfo owner.
Benjamin Kramer [Wed, 14 Nov 2012 18:17:45 +0000 (18:17 +0000)]
Sort the code owner list alphabetically. Add myself as lib/DebugInfo owner.

llvm-svn: 167940

11 years agoX86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.
Jim Grosbach [Wed, 14 Nov 2012 18:04:47 +0000 (18:04 +0000)]
X86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.

When an instruction as written requires 32-bit mode and we're assembling
in 64-bit mode, or vice-versa, issue a more specific diagnostic about
what's wrong.

rdar://12700702

llvm-svn: 167937

11 years agos/assert/llvm_unreachable/
Matt Beaumont-Gay [Wed, 14 Nov 2012 17:58:11 +0000 (17:58 +0000)]
s/assert/llvm_unreachable/

llvm-svn: 167936

11 years agoThe ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,
John McCall [Wed, 14 Nov 2012 17:48:31 +0000 (17:48 +0000)]
The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,
which is not coincidentally the only place it works, either (because
of how it tests for EH_TYPE symbols).

llvm-svn: 167935

11 years agofixes a buildbot failure.
Fariborz Jahanian [Wed, 14 Nov 2012 17:43:08 +0000 (17:43 +0000)]
fixes a buildbot failure.

llvm-svn: 167934

11 years agoGrab debug information for code ownership.
Eric Christopher [Wed, 14 Nov 2012 17:33:40 +0000 (17:33 +0000)]
Grab debug information for code ownership.

llvm-svn: 167933

11 years agoFix 80-column violation.
Fariborz Jahanian [Wed, 14 Nov 2012 17:27:27 +0000 (17:27 +0000)]
Fix 80-column violation.

llvm-svn: 167932

11 years agoobjective-C blocks: Provide layout map for byref
Fariborz Jahanian [Wed, 14 Nov 2012 17:15:51 +0000 (17:15 +0000)]
objective-C blocks: Provide layout map for byref
variables captured in a block. // rdar://12184410

llvm-svn: 167931

11 years agoChange C++0x references to C++11, Fixes bug #12745
Marshall Clow [Wed, 14 Nov 2012 16:31:15 +0000 (16:31 +0000)]
Change C++0x references to C++11, Fixes bug #12745

llvm-svn: 167930

11 years agos/tranform/transform/
Benjamin Kramer [Wed, 14 Nov 2012 15:08:31 +0000 (15:08 +0000)]
s/tranform/transform/

llvm-svn: 167929

11 years ago[TSan] fix indentation
Alexey Samsonov [Wed, 14 Nov 2012 14:33:59 +0000 (14:33 +0000)]
[TSan] fix indentation

llvm-svn: 167928

11 years agoEmit relocations from .debug_aranges to .debug_info for asm files
Alexey Samsonov [Wed, 14 Nov 2012 09:55:38 +0000 (09:55 +0000)]
Emit relocations from .debug_aranges to .debug_info for asm files

llvm-svn: 167926

11 years agoMove some GNUStep-specific code out of CGObjCGNU.
John McCall [Wed, 14 Nov 2012 09:08:34 +0000 (09:08 +0000)]
Move some GNUStep-specific code out of CGObjCGNU.

Patch by Jonathan Schleifer.

llvm-svn: 167925

11 years agoRevert some redundant parts of r142605.
Patrik Hägglund [Wed, 14 Nov 2012 09:04:56 +0000 (09:04 +0000)]
Revert some redundant parts of r142605.

This seems like redundant leftovers from r142288 - exposing
TargetData::parseSpecifier to LLParser - which got reverted. Removes
redunant td != NULL checks in parseSpecifier, and simplifies the
interface to parseSpecifier and init.

llvm-svn: 167924

11 years agotest: LLVM supports now vectors of arbitrary pointers
Tobias Grosser [Wed, 14 Nov 2012 08:25:52 +0000 (08:25 +0000)]
test: LLVM supports now vectors of arbitrary pointers

This allows Polly to vectorize more code. Fix the relevant test cases.

llvm-svn: 167923

11 years agoSet FFLOOR of vectors to expand to keep intruction selection from failing.
Craig Topper [Wed, 14 Nov 2012 08:11:25 +0000 (08:11 +0000)]
Set FFLOOR of vectors to expand to keep intruction selection from failing.

llvm-svn: 167922

11 years agoMark myself as owner of BBVectorize and PowerPC
Hal Finkel [Wed, 14 Nov 2012 07:59:10 +0000 (07:59 +0000)]
Mark myself as owner of BBVectorize and PowerPC

llvm-svn: 167921

11 years agoPR14279: Work around this major miscompilation by treating move operations as
Richard Smith [Wed, 14 Nov 2012 07:36:28 +0000 (07:36 +0000)]
PR14279: Work around this major miscompilation by treating move operations as
non-trivial if they would not call a move operation, even if they would in fact
call a trivial copy operation. A proper fix is to follow, but this small
directed fix is intended for porting to the 3.2 release branch.

llvm-svn: 167920

11 years agoWhen we have a MemberExpr referring to an overloaded static member function,
Richard Smith [Wed, 14 Nov 2012 07:06:31 +0000 (07:06 +0000)]
When we have a MemberExpr referring to an overloaded static member function,
and we resolve it to a specific function based on the type which it's used as,
don't forget to mark it as referenced.

Fixes a regression introduced in r167514.

llvm-svn: 167918

11 years agoAccepting ownership of scheduling.
Andrew Trick [Wed, 14 Nov 2012 07:04:23 +0000 (07:04 +0000)]
Accepting ownership of scheduling.

llvm-svn: 167917

11 years agoFactor out an overly replicated typecast. No functional change.
Craig Topper [Wed, 14 Nov 2012 06:41:09 +0000 (06:41 +0000)]
Factor out an overly replicated typecast. No functional change.

llvm-svn: 167916

11 years agoCode cleanup: Remove trailing whitespace in unwind.h.
Logan Chien [Wed, 14 Nov 2012 06:33:58 +0000 (06:33 +0000)]
Code cleanup: Remove trailing whitespace in unwind.h.

llvm-svn: 167915

11 years agoSet FFLOOR for vectors to expand on CellSPU to keep instruction selection from failin...
Craig Topper [Wed, 14 Nov 2012 05:56:30 +0000 (05:56 +0000)]
Set FFLOOR for vectors to expand on CellSPU to keep instruction selection from failing on llvm.floor of a vector.

llvm-svn: 167914

11 years agoAdd newlines to end of debug messages.
Craig Topper [Wed, 14 Nov 2012 05:20:09 +0000 (05:20 +0000)]
Add newlines to end of debug messages.

llvm-svn: 167913

11 years agoHandle DAG CSE adding new uses during ReplaceAllUsesWith. Fixes PR14333.
Rafael Espindola [Wed, 14 Nov 2012 05:08:56 +0000 (05:08 +0000)]
Handle DAG CSE adding new uses during ReplaceAllUsesWith. Fixes PR14333.

llvm-svn: 167912

11 years agoRemove debugging assert.
David Blaikie [Wed, 14 Nov 2012 04:41:34 +0000 (04:41 +0000)]
Remove debugging assert.

Found by Richard Smith in post-commit review of r167906.

llvm-svn: 167911

11 years agoPatch from Andrew Kaylor andrew.kaylor@intel.com to have
Jason Molenda [Wed, 14 Nov 2012 04:26:02 +0000 (04:26 +0000)]
Patch from Andrew Kaylor andrew.kaylor@intel.com to have
Thread::ResetFrameZeroRegisters() clear the UnwindLLDB object when
resetting the thread's register state.

llvm-svn: 167910

11 years agoSemaTemplateDeduction.cpp: Prune two obsolete descriptions. [-Wdocumentation]
NAKAMURA Takumi [Wed, 14 Nov 2012 02:21:48 +0000 (02:21 +0000)]
SemaTemplateDeduction.cpp: Prune two obsolete descriptions. [-Wdocumentation]

* getMostSpecialized()

/// \param Index if non-NULL and the result of this function is non-nULL,
/// receives the index corresponding to the resulting function template
/// specialization.

* DeduceTemplateArguments()

/// \param Name the name of the function being called. This is only significant
/// when the function template is a conversion function template, in which
/// case this routine will also perform template argument deduction based on
/// the function to which

llvm-svn: 167909

11 years agoParseTemplate.cpp: Doxygen fix in AnnotateTemplateIdToken(). [-Wdocumentation]
NAKAMURA Takumi [Wed, 14 Nov 2012 02:21:42 +0000 (02:21 +0000)]
ParseTemplate.cpp: Doxygen fix in AnnotateTemplateIdToken(). [-Wdocumentation]

llvm-svn: 167908

11 years agoSuppress elided variadic macro argument extension diagnostic for macros using
Eli Friedman [Wed, 14 Nov 2012 02:18:46 +0000 (02:18 +0000)]
Suppress elided variadic macro argument extension diagnostic for macros using
the related comma pasting extension.

In certain cases, we used to get two diagnostics for what is essentially one
extension.  This change suppresses the first diagnostic in certain cases
where we know we're going to print the second diagnostic.  The
diagnostic is redundant, and it can't be suppressed in the definition
of the macro because it points at the use of the macro, so we want to
avoid printing it if possible.

The implementation works by detecting constructs which look like comma
pasting at the time of the definition of the macro; this information
is then used when the macro is used.  (We can't actually detect
whether we're using the comma pasting extension until the macro is
actually used, but we can detecting constructs which will be comma
pasting if the varargs argument is elided.)

<rdar://problem/12292192>

llvm-svn: 167907

11 years agoProvide the correct mangling and linkage for certain unnamed nested classes.
David Blaikie [Wed, 14 Nov 2012 01:52:05 +0000 (01:52 +0000)]
Provide the correct mangling and linkage for certain unnamed nested classes.

This corrects the mangling and linkage of classes (& their member functions) in
cases like this:

  struct foo {
    struct {
      void func() { ... }
    } x;
  };

we were accidentally giving this nested unnamed struct 'no' linkage where it
should've had the linkage of the outer class. The mangling was incorrecty too,
mangling as TU-wide unnamed type mangling of $_X rather than class-scoped
mangling of UtX_.

This also fixes -Wunused-member-function which would incorrectly diagnose
'func' as unused due to it having no linkage & thus appearing to be TU-local
when in fact it might be correctly used in another TU.

Similar mangling should be applied to function local classes in similar cases
but I've deferred that for a subsequent patch.

Review/discussion by Richard Smith, John McCall, & especially Eli Friedman.

llvm-svn: 167906

11 years agodocs: Fix Sphinx toctree warning.
Sean Silva [Wed, 14 Nov 2012 01:49:23 +0000 (01:49 +0000)]
docs: Fix Sphinx toctree warning.

llvm-svn: 167905

11 years agoUse TARGET2 relocation for TType references on ARM.
Anton Korobeynikov [Wed, 14 Nov 2012 01:47:00 +0000 (01:47 +0000)]
Use TARGET2 relocation for TType references on ARM.
Do some cleanup of the code while here.

Inspired by patch by Logan Chien!

llvm-svn: 167904

11 years agodocs: chmod -x HowToUseInstrMappings.rst
Sean Silva [Wed, 14 Nov 2012 01:41:58 +0000 (01:41 +0000)]
docs: chmod -x HowToUseInstrMappings.rst

llvm-svn: 167903

11 years agoUse consistent spelling of 'behavior' in a C++ warning.
Anders Carlsson [Wed, 14 Nov 2012 01:39:09 +0000 (01:39 +0000)]
Use consistent spelling of 'behavior' in a C++ warning.

llvm-svn: 167902

11 years agoThis function isn't called SaveFiles any more.
Nick Lewycky [Wed, 14 Nov 2012 01:33:49 +0000 (01:33 +0000)]
This function isn't called SaveFiles any more.

llvm-svn: 167901

11 years agoFix an assertion failure printing the unused-label fixit in files using CRLF line...
Eli Friedman [Wed, 14 Nov 2012 01:28:38 +0000 (01:28 +0000)]
Fix an assertion failure printing the unused-label fixit in files using CRLF line endings.  <rdar://problem/12639047>.

llvm-svn: 167900

11 years agoRemove another questionable use of hasTrivial*. The relevant thing for this
Richard Smith [Wed, 14 Nov 2012 00:50:40 +0000 (00:50 +0000)]
Remove another questionable use of hasTrivial*. The relevant thing for this
test was whether the /selected/ operator= was trivial, not whether the class
had any trivial (or any non-trivial) operator=s.

llvm-svn: 167897

11 years agoAccept and pass arguments to __unknown_anytype in argument
John McCall [Wed, 14 Nov 2012 00:49:39 +0000 (00:49 +0000)]
Accept and pass arguments to __unknown_anytype in argument
positions of Objective-C methods.

It is possible to recover a lot of type information about
Objective-C methods from the reflective metadata for their
implementations.  This information is not rich when it
comes to struct types, however, and it is not possible to
produce a type in the debugger's round-tripped AST which
will really do anything useful during type-checking.
Therefore we allow __unknown_anytype in these positions,
which essentially disables type-checking for that argument.
We infer the parameter type to be the unqualified type of
the argument expression unless that expression is an
explicit cast, in which case it becomes the type-as-written
of that cast.

rdar://problem/12565338

llvm-svn: 167896

11 years ago<rdar://problem/12695557>
Greg Clayton [Wed, 14 Nov 2012 00:23:48 +0000 (00:23 +0000)]
<rdar://problem/12695557>

Added missing plist files for iOS.

llvm-svn: 167895

11 years agoFix broken asserts. Also, spell 'indices' correctly.
Matt Beaumont-Gay [Wed, 14 Nov 2012 00:21:27 +0000 (00:21 +0000)]
Fix broken asserts. Also, spell 'indices' correctly.

llvm-svn: 167894

11 years ago[Object] Fix endianess bug by refactoring Archive::Symbol::getMember.
Michael J. Spencer [Wed, 14 Nov 2012 00:04:13 +0000 (00:04 +0000)]
[Object] Fix endianess bug by refactoring Archive::Symbol::getMember.

llvm-svn: 167893

11 years agouse the getSplat API. Patch by Paul Redmond.
Nadav Rotem [Wed, 14 Nov 2012 00:02:13 +0000 (00:02 +0000)]
use the getSplat API. Patch by Paul Redmond.

llvm-svn: 167892

11 years agoFix typo
Matt Beaumont-Gay [Wed, 14 Nov 2012 00:00:25 +0000 (00:00 +0000)]
Fix typo

llvm-svn: 167891

11 years agoFix typo from code review (thanks to Alexey Samsonov). This is also caught by the...
Richard Smith [Tue, 13 Nov 2012 23:58:20 +0000 (23:58 +0000)]
Fix typo from code review (thanks to Alexey Samsonov). This is also caught by the existing tests when building for i386.

llvm-svn: 167890

11 years agoSupport for building the ubsan runtime when using the autoconf build system on
Richard Smith [Tue, 13 Nov 2012 23:55:06 +0000 (23:55 +0000)]
Support for building the ubsan runtime when using the autoconf build system on
Darwin. Patch by Jean-Daniel Dupas, tweaked by Jonathan Sauer, simplified
somewhat by me.

llvm-svn: 167889

11 years ago-fsanitize=undefined: Switch to using sanitizer_common for output. This gets us much...
Richard Smith [Tue, 13 Nov 2012 23:42:05 +0000 (23:42 +0000)]
-fsanitize=undefined: Switch to using sanitizer_common for output. This gets us much closer to not depending on any system headers.

llvm-svn: 167888

11 years agoRevert "Use the 'count' attribute instead of the 'upper_bound' attribute."
Eric Christopher [Tue, 13 Nov 2012 23:30:57 +0000 (23:30 +0000)]
Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."
temporarily since it breaks the gdb bots.

This reverts commit r167807/30305bec25cac981c6d4a3b8be004401310a82a7.

llvm-svn: 167887

11 years agoRevert "Use the 'count' attribute instead of the 'upper_bound' attribute."
Eric Christopher [Tue, 13 Nov 2012 23:30:43 +0000 (23:30 +0000)]
Revert "Use the 'count' attribute instead of the 'upper_bound' attribute."
temporarily as it is breaking the gdb bots.

This reverts commit r167806/e7ff4c14b157746b3e0228d2dce9f70712d1c126.

llvm-svn: 167886

11 years agoDon't try to save the assigned value in a Objective-C property assignment
Eli Friedman [Tue, 13 Nov 2012 23:16:33 +0000 (23:16 +0000)]
Don't try to save the assigned value in a Objective-C property assignment
if the type of the value is a non-trivial class type.  Fixes PR14318.

(There's a minor ObjC++ language change here: given that we can't save the
value, the type of the assignment expression is void in such cases.)

llvm-svn: 167884

11 years ago[asan] use #if defined __x86_64__ instead of #if __WORDSIZE == 64 in sanitizer_linux.cc
Kostya Serebryany [Tue, 13 Nov 2012 23:13:17 +0000 (23:13 +0000)]
[asan] use #if defined __x86_64__ instead of #if __WORDSIZE == 64 in sanitizer_linux.cc

llvm-svn: 167883

11 years agoAcknowledge code ownership of MC.
Jim Grosbach [Tue, 13 Nov 2012 23:01:35 +0000 (23:01 +0000)]
Acknowledge code ownership of MC.

llvm-svn: 167882

11 years agoAssignment of Bitcode ownership to Joe Abbey, after announcing proposal on
Joe Abbey [Tue, 13 Nov 2012 22:32:15 +0000 (22:32 +0000)]
Assignment of Bitcode ownership to Joe Abbey, after announcing proposal on
LLVMdev and not hearing any major objections.  Although it did spark a nice
discussion regarding what it means to own something in LLVM.

llvm-svn: 167881

11 years agoRevert -join-splitedges to a boolean cmd line option.
Andrew Trick [Tue, 13 Nov 2012 22:19:48 +0000 (22:19 +0000)]
Revert -join-splitedges to a boolean cmd line option.

llvm-svn: 167880

11 years agoThe MachineScheduler does not currently require JoinSplitEdges.
Andrew Trick [Tue, 13 Nov 2012 22:15:40 +0000 (22:15 +0000)]
The MachineScheduler does not currently require JoinSplitEdges.

This option will eventually either be enabled unconditionally or
replaced by a more general live range splitting optimization.

llvm-svn: 167879

11 years ago[ms] Make mangleIntegerLiteral less aware of exact type of the literal.
Nico Weber [Tue, 13 Nov 2012 22:09:44 +0000 (22:09 +0000)]
[ms] Make mangleIntegerLiteral less aware of exact type of the literal.

Integer literal mangling does not actually depend on exact type of the literal.
This will simplify calling mangleIntegerLiteral when literal type is not known,
for example, when sizes or offsets are mangled as integer literals.

Also, call mangleNumber instead of directly printing mangled values of 0/1, to
avoid this knowledge from being in multiple places.

Patch from Evgeny Eltsin!

llvm-svn: 167878

11 years ago[MC][COFF] Emit weak symbols to the correct section. Patch by Dmitry Puzirev!
Michael J. Spencer [Tue, 13 Nov 2012 22:04:09 +0000 (22:04 +0000)]
[MC][COFF] Emit weak symbols to the correct section. Patch by Dmitry Puzirev!

llvm-svn: 167877

11 years agoRevert r167836, "llvm/test/Other/close-stderr.ll: Mark it as XFAIL:mingw32 for now...
NAKAMURA Takumi [Tue, 13 Nov 2012 21:57:42 +0000 (21:57 +0000)]
Revert r167836, "llvm/test/Other/close-stderr.ll: Mark it as XFAIL:mingw32 for now.", corresponding to r167849.

llvm-svn: 167876

11 years agoAdd test case to verify correct relocs being generated for
Ulrich Weigand [Tue, 13 Nov 2012 21:53:43 +0000 (21:53 +0000)]
Add test case to verify correct relocs being generated for
TLS symbols on PowerPC using the integrated assembler.

llvm-svn: 167875

11 years agoAdd program header emission to ELF writer. This patch also rearranges sections for...
Hemant Kulkarni [Tue, 13 Nov 2012 21:34:45 +0000 (21:34 +0000)]
Add program header emission to ELF writer. This patch also rearranges sections for efficient memory utilization

llvm-svn: 167874

11 years agoFor classes that have the warn_unused_result attribute, don't apply the
Kaelyn Uhrain [Tue, 13 Nov 2012 21:23:31 +0000 (21:23 +0000)]
For classes that have the warn_unused_result attribute, don't apply the
attribute to the class' methods even when they return an instance of the
class (e.g. assignment operators).

llvm-svn: 167873

11 years agonumerically sort the symbols, so that the testcase result is uniform
Shankar Easwaran [Tue, 13 Nov 2012 21:01:11 +0000 (21:01 +0000)]
numerically sort the symbols, so that the testcase result is uniform

llvm-svn: 167872

11 years agochanges after mspencer reviews in phabricator
Shankar Easwaran [Tue, 13 Nov 2012 20:34:55 +0000 (20:34 +0000)]
changes after mspencer reviews in phabricator

llvm-svn: 167871