platform/upstream/llvm.git
10 years ago[asan] refactor the use-after-return API so that the size class is computed at compil...
Kostya Serebryany [Tue, 10 Sep 2013 13:16:56 +0000 (13:16 +0000)]
[asan] refactor the use-after-return API so that the size class is computed at compile time instead of at run-time. llvm part

llvm-svn: 190407

10 years ago[asan] refactor the use-after-return API so that the size class is computed at compil...
Kostya Serebryany [Tue, 10 Sep 2013 13:16:26 +0000 (13:16 +0000)]
[asan] refactor the use-after-return API so that the size class is computed at compile time instead of at run-time. compiler-rt part

llvm-svn: 190406

10 years agoCorrectly calculate OriginalColumn after multi-line tokens.
Alexander Kornienko [Tue, 10 Sep 2013 12:29:48 +0000 (12:29 +0000)]
Correctly calculate OriginalColumn after multi-line tokens.

Summary: This also unifies the handling of escaped newlines for all tokens.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1638

llvm-svn: 190405

10 years ago[SystemZ] Update README.
Richard Sandiford [Tue, 10 Sep 2013 12:22:45 +0000 (12:22 +0000)]
[SystemZ] Update README.

llvm-svn: 190404

10 years ago[msan] Make all pointers in msan_interface "const volatile void *".
Evgeniy Stepanov [Tue, 10 Sep 2013 11:54:51 +0000 (11:54 +0000)]
[msan] Make all pointers in msan_interface "const volatile void *".

This way msan annotations can be used with both normal and volatile memory.

llvm-svn: 190403

10 years ago[msan] bool -> int to make msan_interface.h C-compatible.
Evgeniy Stepanov [Tue, 10 Sep 2013 11:04:37 +0000 (11:04 +0000)]
[msan] bool -> int to make msan_interface.h C-compatible.

llvm-svn: 190402

10 years agoclang-format: Understand function type typedefs with typeof.
Daniel Jasper [Tue, 10 Sep 2013 10:26:38 +0000 (10:26 +0000)]
clang-format: Understand function type typedefs with typeof.

Before:
  typedef typeof(int(int, int)) * MyFunc;
After:
  typedef typeof(int(int, int)) *MyFunc;

This fixes llvm.org/PR17178.

llvm-svn: 190401

10 years ago[SystemZ] Add TM and TMY
Richard Sandiford [Tue, 10 Sep 2013 10:20:32 +0000 (10:20 +0000)]
[SystemZ] Add TM and TMY

The main complication here is that TM and TMY (the memory forms) set
CC differently from the register forms.  When the tested bits contain
some 0s and some 1s, the register forms set CC to 1 or 2 based on the
value the uppermost bit.  The memory forms instead set CC to 1
regardless of the uppermost bit.

Until now, I've tried to make it so that a branch never tests for an
impossible CC value.  E.g. NR only sets CC to 0 or 1, so branches on the
result will only test for 0 or 1.  Originally I'd tried to do the same
thing for TM and TMY by using custom matching code in ISelDAGToDAG.
That ended up being very ugly though, and would have meant duplicating
some of the chain checks that the common isel code does.

I've therefore gone for the simpler alternative of adding an extra
operand to the TM DAG opcode to say whether a memory form would be OK.
This means that the inverse of a "TM;JE" is "TM;JNE" rather than the
more precise "TM;JNLE", just like the inverse of "TMLL;JE" is "TMLL;JNE".
I suppose that's arguably less confusing though...

llvm-svn: 190400

10 years ago[mips][msa] Removed unsupported dot product instructions (dotp_[su].b).
Daniel Sanders [Tue, 10 Sep 2013 10:10:39 +0000 (10:10 +0000)]
[mips][msa] Removed unsupported dot product instructions (dotp_[su].b).

The dotp_[su].b instructions never existed in any revision of the MSA spec.

llvm-svn: 190399

10 years ago[mips][msa] Removed unsupported dot product instructions (dotp_[su].b)
Daniel Sanders [Tue, 10 Sep 2013 09:51:43 +0000 (09:51 +0000)]
[mips][msa] Removed unsupported dot product instructions (dotp_[su].b)

The dotp_[su].b instructions never existed in any revision of the MSA spec.

llvm-svn: 190398

10 years agoAdd test cases for Mips mthc1/mfhc1 instructions. Add check for odd value of register...
Vladimir Medic [Tue, 10 Sep 2013 09:50:01 +0000 (09:50 +0000)]
Add test cases for Mips mthc1/mfhc1 instructions. Add check for odd value of register when PFU is 32 bit.

llvm-svn: 190397

10 years agoRemove obsolete code from MipsAsmParser.cpp.
Vladimir Medic [Tue, 10 Sep 2013 09:39:55 +0000 (09:39 +0000)]
Remove obsolete code from MipsAsmParser.cpp.

llvm-svn: 190396

10 years agoCalculate and store ColumnWidth instead of CodePointCount in FormatTokens.
Alexander Kornienko [Tue, 10 Sep 2013 09:38:25 +0000 (09:38 +0000)]
Calculate and store ColumnWidth instead of CodePointCount in FormatTokens.

Summary:
This fixes various issues with mixed tabs and spaces handling, e.g.
when realigning block comments.

Reviewers: klimek, djasper

Reviewed By: djasper

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1608

llvm-svn: 190395

10 years agoDelete unused static class members
Alexey Samsonov [Tue, 10 Sep 2013 09:26:48 +0000 (09:26 +0000)]
Delete unused static class members

llvm-svn: 190394

10 years agoRejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental.
Stepan Dyatkovskiy [Tue, 10 Sep 2013 08:37:22 +0000 (08:37 +0000)]
Rejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental.

llvm-svn: 190393

10 years ago[ASan] Don't crash in DescribeHeapAddress if we don't know the current thread's ID
Timur Iskhodzhanov [Tue, 10 Sep 2013 08:36:21 +0000 (08:36 +0000)]
[ASan] Don't crash in DescribeHeapAddress if we don't know the current thread's ID

Also make DescribeThread easier to use.
This was firing on Dr.ASan runs, not sure how to repro InvalidTID in a simple test.

llvm-svn: 190392

10 years agoFix for PR16752. Second commit.
Stepan Dyatkovskiy [Tue, 10 Sep 2013 08:18:44 +0000 (08:18 +0000)]
Fix for PR16752. Second commit.

PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.

Fixes:
1st Commit (Done): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.

llvm-svn: 190391

10 years agoFix minor coding style issue in r190296 pointed out by Richard Smith.
David Tweed [Tue, 10 Sep 2013 08:00:34 +0000 (08:00 +0000)]
Fix minor coding style issue in r190296 pointed out by Richard Smith.

llvm-svn: 190390

10 years ago[python-bindings] Changed test_memory_buffer_create_from_file to just use the generic...
Michael Gottesman [Tue, 10 Sep 2013 06:58:00 +0000 (06:58 +0000)]
[python-bindings] Changed test_memory_buffer_create_from_file to just use the generic provided test_file instead of a binary.

llvm-svn: 190389

10 years ago[python bindings] Added code to get the length of a memory buffer. Tests are included.
Michael Gottesman [Tue, 10 Sep 2013 06:57:57 +0000 (06:57 +0000)]
[python bindings] Added code to get the length of a memory buffer. Tests are included.

This is a part of a series of patches that have been sitting fallow on a
personal branch that I have been messing with for a bit.

The patches start to flesh out the python llvm-c wrapper to the point where you can:

1. Load Modules from Bitcode/Dump/Print them.
2. Iterate over Functions from those modules/get their names/dump them.
3. Iterate over the BasicBlocks from said function/get the BB's name/dump it.
4. Iterate over the Instructions in said BasicBlocks/get the instructions
   name/dump the instruction.

My main interest in developing this was to be able to gather statistics about
LLVM IR using python scripts to speed up statistical profiling of different IR
level transformations (hence the focus on printing/dumping/getting names).

This is a gift from me to the LLVM community = ).

I am going to be committing the patches slowly over the next bit as I have time
to prepare the patches.

The overall organization follows the c-api like the bindings that are already
implemented.

llvm-svn: 190388

10 years agoSeparate popcnt and sse4.2 feature control somewhat to match gcc behavior.
Craig Topper [Tue, 10 Sep 2013 06:55:47 +0000 (06:55 +0000)]
Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.

Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled.
Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled.

llvm-svn: 190387

10 years agoMCObjectFileInfo.cpp: Fix a couple of possible typo(s), s/DwarfPub/DwarfGnuPub/,...
NAKAMURA Takumi [Tue, 10 Sep 2013 06:01:56 +0000 (06:01 +0000)]
MCObjectFileInfo.cpp: Fix a couple of possible typo(s), s/DwarfPub/DwarfGnuPub/, in r190344.

XFAIL can be removed. (in r190374)

llvm-svn: 190386

10 years agoGenerate code for the move assignment operator using memcpy, the same as we do
Nick Lewycky [Tue, 10 Sep 2013 05:14:39 +0000 (05:14 +0000)]
Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.

llvm-svn: 190385

10 years agoTempScopInfo: Microoptimize constant conditions
Tobias Grosser [Tue, 10 Sep 2013 04:47:19 +0000 (04:47 +0000)]
TempScopInfo: Microoptimize constant conditions

Use 0 >= 1 instead of 0 != 0 to represent 'false'. This might be slightly more
efficient as isl may create a union of sets for 0 != 0, whereas this is never
needed for the expression 0 >= 1.

Contributed-by: Alexandre Isoard <alexandre.isoard@gmail.com>
llvm-svn: 190384

10 years agoDelete unused variables.
Eli Friedman [Tue, 10 Sep 2013 03:27:07 +0000 (03:27 +0000)]
Delete unused variables.

llvm-svn: 190383

10 years agoMake -Wunused warning rules more consistent.
Eli Friedman [Tue, 10 Sep 2013 03:05:56 +0000 (03:05 +0000)]
Make -Wunused warning rules more consistent.

This patch does a few different things.

This patch improves unused var diags for const vars: we no longer
unconditionally suppress diagnostics for const vars, instead only suppressing
the diagnostic when the declaration appears to be useful.

This patch also makes us more consistently use whether a variable/function
is declared in the main file to suppress diagnostics where appropriate.

Fixes <rdar://problem/14907887>.

llvm-svn: 190382

10 years agoChanging the default shell to /bin/sh brought up a long-standing bug on OS X,
Jim Ingham [Tue, 10 Sep 2013 02:09:47 +0000 (02:09 +0000)]
Changing the default shell to /bin/sh brought up a long-standing bug on OS X,
that /bin/sh re-exec's itself to /bin/bash, so it needs one more resume when you
are using it as the shell than /bin/bash did or you will stop at the start of your
program, rather than running it.

So I added a Platform API to get the number of resumes needed when launching with
a particular shell, and set the right values for Mac OS X.

<rdar://problem/14935282>

llvm-svn: 190381

10 years agoChange the "breakpoint fuzz" algorithm from "coalesce the line ranges for a file...
Jim Ingham [Tue, 10 Sep 2013 02:06:17 +0000 (02:06 +0000)]
Change the "breakpoint fuzz" algorithm from "coalesce the line ranges for a file & line breakpoint if they are contiguous" to
"coalesce the line ranges for a file & line breakpoint to the first range in each block".  We were still setting a silly number
of independent breakpoints sometimes, and until we get a compiler that emits trustworthy is_stmt flags in the line table, we
need to do something to reduce the noise.

<rdar://problem/14920404>

llvm-svn: 190380

10 years ago[dfsan] Initial set of DFSAN_OPTIONS flags.
Peter Collingbourne [Tue, 10 Sep 2013 01:51:35 +0000 (01:51 +0000)]
[dfsan] Initial set of DFSAN_OPTIONS flags.

llvm-svn: 190379

10 years agoclang-cl: use -fdiagnostics-format=msvc by default
Hans Wennborg [Tue, 10 Sep 2013 01:07:07 +0000 (01:07 +0000)]
clang-cl: use -fdiagnostics-format=msvc by default

This allows for navigating to errors within the MSVC IDE by clicking
on the diagnostics.

llvm-svn: 190378

10 years agoIgnore calling conventions when checking function template specializations
Reid Kleckner [Tue, 10 Sep 2013 01:04:45 +0000 (01:04 +0000)]
Ignore calling conventions when checking function template specializations

Summary:
Calling conventions are inherited during decl merging.  Before this
change, deduction would fail due to a type mismatch between the template
and the specialization.  This change adjusts the CCs to match before
deduction, and lets the decl merging logic diagnose mismatch or inherit
the CC from the template.

This allows specializations of static member function templates in the
Microsoft C++ ABI.

Reviewers: rsmith

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1570

llvm-svn: 190377

10 years agoDon't use getSetCCResultType for creating a vselect
Matt Arsenault [Tue, 10 Sep 2013 00:41:56 +0000 (00:41 +0000)]
Don't use getSetCCResultType for creating a vselect

The vselect mask isn't a setcc.

This breaks in the case when the result of getSetCCResultType
is larger than the vector operands

e.g. %tmp = select i1 %cmp <2 x i8> %a, <2 x i8> %b
when getSetCCResultType returns <2 x i32>, the assertion
that the (MaskTy.getSizeInBits() == Op1.getValueType().getSizeInBits())
is hit.

No test since I don't think I can hit this with any of the current
targets. The R600/SI implementation would break, since it returns a
vector of i1 for this, but it doesn't reach ExpandSELECT for other
reasons.

llvm-svn: 190376

10 years agoUse StringRef::npos for StringRef instead of std::string one
Matt Arsenault [Tue, 10 Sep 2013 00:41:53 +0000 (00:41 +0000)]
Use StringRef::npos for StringRef instead of std::string one

llvm-svn: 190375

10 years agollvm/test/DebugInfo/dwarf-public-names.ll: Mark it as XFAIL for PECOFF targets, for...
NAKAMURA Takumi [Tue, 10 Sep 2013 00:28:23 +0000 (00:28 +0000)]
llvm/test/DebugInfo/dwarf-public-names.ll: Mark it as XFAIL for PECOFF targets, for now. Investigating.

FIXME: llvm-dwarfdump doesn't handle PECOFF.
llvm-svn: 190374

10 years agoRevert r190366. It was breaking build bots.
Bill Wendling [Tue, 10 Sep 2013 00:20:27 +0000 (00:20 +0000)]
Revert r190366. It was breaking build bots.

llvm-svn: 190373

10 years agoObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
Fariborz Jahanian [Mon, 9 Sep 2013 23:56:14 +0000 (23:56 +0000)]
ObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
annotation on methods which return typedef of pointer to
an incomplete struct type.

llvm-svn: 190372

10 years agoAdd ability to set OPTIONS for compile
Marshall Clow [Mon, 9 Sep 2013 23:53:08 +0000 (23:53 +0000)]
Add ability to set OPTIONS for compile

llvm-svn: 190371

10 years agoAttempting to unbreak the makefile-base builds.
Aaron Ballman [Mon, 9 Sep 2013 23:50:01 +0000 (23:50 +0000)]
Attempting to unbreak the makefile-base builds.

llvm-svn: 190370

10 years agoAdding a FIXME based on feedback from Richard Smith.
Aaron Ballman [Mon, 9 Sep 2013 23:40:31 +0000 (23:40 +0000)]
Adding a FIXME based on feedback from Richard Smith.

llvm-svn: 190369

10 years agoAttribute tablegen now understands that attribute arguments can be optional. This...
Aaron Ballman [Mon, 9 Sep 2013 23:33:17 +0000 (23:33 +0000)]
Attribute tablegen now understands that attribute arguments can be optional.  This allows for automated checking of the number of arguments expected vs number of arguments given for attributes.  Greatly reduces the amount of manual checking required.

llvm-svn: 190368

10 years agoEnable -misched-cyclicpath by default.
Andrew Trick [Mon, 9 Sep 2013 23:31:14 +0000 (23:31 +0000)]
Enable -misched-cyclicpath by default.

llvm-svn: 190367

10 years agoUse a default value for the prologue's debug location.
Bill Wendling [Mon, 9 Sep 2013 23:28:15 +0000 (23:28 +0000)]
Use a default value for the prologue's debug location.

llvm-svn: 190366

10 years agoFixed parsing of the .debug_aranges section so that LLDB will still work correctly...
Richard Mitton [Mon, 9 Sep 2013 23:17:40 +0000 (23:17 +0000)]
Fixed parsing of the .debug_aranges section so that LLDB will still work correctly even if arange data is not available for every object file in the program.

llvm-svn: 190365

10 years agoDebug Info: In DIBuilder, the context fields of a TAG_inheritance and a
Manman Ren [Mon, 9 Sep 2013 23:07:58 +0000 (23:07 +0000)]
Debug Info: In DIBuilder, the context fields of a TAG_inheritance and a
TAG_friend are updated to use scope reference.

Added testing cases to verify that class with inheritance can be uniqued.

llvm-svn: 190364

10 years agoDebug Info: move DIScope::getContext back from DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 22:35:23 +0000 (22:35 +0000)]
Debug Info: move DIScope::getContext back from DwarfDebug.

This partially reverts r190330. DIScope::getContext now returns DIScopeRef
instead of DIScope. We construct a DIScopeRef from DIScope when we are
dealing with subprogram, lexical block or name space.

llvm-svn: 190362

10 years ago<rdar://problem/14728845>
Enrico Granata [Mon, 9 Sep 2013 22:35:18 +0000 (22:35 +0000)]
<rdar://problem/14728845>

Making the --timeout (-t) option to "platform shell" work for real

llvm-svn: 190361

10 years agomi-sched: smooth out the cyclicpath heuristic.
Andrew Trick [Mon, 9 Sep 2013 22:28:08 +0000 (22:28 +0000)]
mi-sched: smooth out the cyclicpath heuristic.

Arnold's idea.

I generally try to avoid stateful heuristics because it can make
debugging harder. However, we need a way to prevent the latency
priority from dominating, and it somewhat makes sense to schedule
aggressively for latency only within an issue group.

Swift in particular likes this, and it doesn't hurt anyone else:
| Benchmarks/MiBench/consumer-lame              |  10.39% |
| Benchmarks/Misc/himenobmtxpa                  |   9.63% |

llvm-svn: 190360

10 years agoDon't allow a NULL-length file. Try to revert to the buffered version.
Bill Wendling [Mon, 9 Sep 2013 22:25:46 +0000 (22:25 +0000)]
Don't allow a NULL-length file. Try to revert to the buffered version.

llvm-svn: 190359

10 years agowhite spaces and long lines
Jack Carter [Mon, 9 Sep 2013 22:02:08 +0000 (22:02 +0000)]
white spaces and long lines

llvm-svn: 190358

10 years agoDon't shrink atomic ops to bool in GlobalOpt.
Eli Friedman [Mon, 9 Sep 2013 22:00:13 +0000 (22:00 +0000)]
Don't shrink atomic ops to bool in GlobalOpt.

LLVM IR doesn't currently allow atomic bool load/store operations, and the
transformation is dubious anyway because it isn't profitable on all platforms.

PR17163.

llvm-svn: 190357

10 years agoDisabling tests affected by llvm.org/pr16170 on Linux
Daniel Malea [Mon, 9 Sep 2013 21:28:44 +0000 (21:28 +0000)]
Disabling tests affected by llvm.org/pr16170 on Linux
- occasional lldb hangs are causing noisy buildbots and trouble in the (Debian/Ubuntu) package builder

llvm-svn: 190355

10 years agoSet the encoding to '0' if we don't have an MAB.
Bill Wendling [Mon, 9 Sep 2013 21:22:44 +0000 (21:22 +0000)]
Set the encoding to '0' if we don't have an MAB.

llvm-svn: 190354

10 years agoFix a crash introduced in r189828.
Matt Beaumont-Gay [Mon, 9 Sep 2013 21:07:58 +0000 (21:07 +0000)]
Fix a crash introduced in r189828.

The predicates in CXXRecordDecl which test various properties of special
members can't be called on incomplete decls.

llvm-svn: 190353

10 years ago[InstCombiner] Expose opportunities to merge subtract and comparison.
Quentin Colombet [Mon, 9 Sep 2013 20:56:48 +0000 (20:56 +0000)]
[InstCombiner] Expose opportunities to merge subtract and comparison.

Several architectures use the same instruction to perform both a comparison and
a subtract. The instruction selection framework does not allow to consider
different basic blocks to expose such fusion opportunities.

Therefore, these instructions are “merged” by CSE at MI IR level.

To increase the likelihood of CSE to apply in such situation, we reorder the
operands of the comparison, when they have the same complexity, so that they
matches the order of the most frequent subtract.
E.g.,

icmp A, B
...
sub B, A

<rdar://problem/14514580>

llvm-svn: 190352

10 years agoDebug Info Testing: remove a commented out line.
Manman Ren [Mon, 9 Sep 2013 20:45:34 +0000 (20:45 +0000)]
Debug Info Testing: remove a commented out line.

llvm-svn: 190351

10 years agoAnother attempt to fix windows buildbots.
Bill Wendling [Mon, 9 Sep 2013 20:29:32 +0000 (20:29 +0000)]
Another attempt to fix windows buildbots.

llvm-svn: 190350

10 years agoAttempt to fix buildbots by giving an explicit output to the llvm-mc command.
Bill Wendling [Mon, 9 Sep 2013 20:22:38 +0000 (20:22 +0000)]
Attempt to fix buildbots by giving an explicit output to the llvm-mc command.

llvm-svn: 190349

10 years agoExpand test to make sure that we can generate compact unwind from an ASM file.
Bill Wendling [Mon, 9 Sep 2013 20:12:36 +0000 (20:12 +0000)]
Expand test to make sure that we can generate compact unwind from an ASM file.

llvm-svn: 190348

10 years agoExpand test to make sure that we can generate compact unwind from an ASM file.
Bill Wendling [Mon, 9 Sep 2013 20:10:54 +0000 (20:10 +0000)]
Expand test to make sure that we can generate compact unwind from an ASM file.

llvm-svn: 190347

10 years agoAlways add global names. We're adding them in the rest of the code
Eric Christopher [Mon, 9 Sep 2013 20:03:20 +0000 (20:03 +0000)]
Always add global names. We're adding them in the rest of the code
as well as types.

No functional change as they're not emitted unless the option
is true anyhow.

llvm-svn: 190346

10 years agoRename for consistency.
Eric Christopher [Mon, 9 Sep 2013 20:03:17 +0000 (20:03 +0000)]
Rename for consistency.

llvm-svn: 190345

10 years agoAdd the gnu pubnames and pubtypes sections to the mc object file
Eric Christopher [Mon, 9 Sep 2013 20:03:14 +0000 (20:03 +0000)]
Add the gnu pubnames and pubtypes sections to the mc object file
handling.

llvm-svn: 190344

10 years agoAdd constant defines for gnu pubnames and gnu pubtypes - they're used
Eric Christopher [Mon, 9 Sep 2013 20:03:11 +0000 (20:03 +0000)]
Add constant defines for gnu pubnames and gnu pubtypes - they're used
for the gdb index as the names convey.

llvm-svn: 190343

10 years agoFormatting.
Eric Christopher [Mon, 9 Sep 2013 20:03:08 +0000 (20:03 +0000)]
Formatting.

llvm-svn: 190342

10 years agoModern ObjectiveC translator. Fix translation of
Fariborz Jahanian [Mon, 9 Sep 2013 19:59:59 +0000 (19:59 +0000)]
Modern ObjectiveC translator. Fix translation of
message sent to aggregate-valued methods. Fix
visibility of trampoline type used in translation
of such expressions.  // rdar://14932320

llvm-svn: 190341

10 years ago[docs] Prominently note modules are experimental.
Sean Silva [Mon, 9 Sep 2013 19:57:49 +0000 (19:57 +0000)]
[docs] Prominently note modules are experimental.

It was really hard to tell that modules are experimental. This makes it
really clear by

* Noting the experimental status in the title.
* Moving the "warning" above the table of contents.

llvm-svn: 190340

10 years ago[docs] End users should see just "Clang"
Sean Silva [Mon, 9 Sep 2013 19:50:47 +0000 (19:50 +0000)]
[docs] End users should see just "Clang"

Half the internet has wildly incorrect ideas about what LLVM is (in
particular, many get the impression that LLVM is some magical
cross-platform runtime), so saying "LLVM" near "cross-compilation" in a
user-facing doc might provoke confusion.

llvm-svn: 190338

10 years ago[docs] Fix Sphinx toctree warning.
Sean Silva [Mon, 9 Sep 2013 19:50:46 +0000 (19:50 +0000)]
[docs] Fix Sphinx toctree warning.

Last I heard LSan is getting close to prime-time, but for now keep
LeakSanitizer.rst hidden (especially since it contains so little
content).

llvm-svn: 190337

10 years ago[docs] Fix some finicky Sphinx warnings.
Sean Silva [Mon, 9 Sep 2013 19:50:40 +0000 (19:50 +0000)]
[docs] Fix some finicky Sphinx warnings.

llvm-svn: 190336

10 years agoCall generateCompactUnwindEncodings() right before we need to output the frame inform...
Bill Wendling [Mon, 9 Sep 2013 19:48:37 +0000 (19:48 +0000)]
Call generateCompactUnwindEncodings() right before we need to output the frame information.

There are more than one paths to where the frame information is emitted. Place
the call to generateCompactUnwindEncodings() into the method which outputs the
frame information, thus ensuring that the encoding is there for every path. This
involved threading the MCAsmBackend object through to this method.

<rdar://problem/13623355>

llvm-svn: 190335

10 years agoDebug Info: Use DIScopeRef for DIType::getContext.
Manman Ren [Mon, 9 Sep 2013 19:47:11 +0000 (19:47 +0000)]
Debug Info: Use DIScopeRef for DIType::getContext.

In DIBuilder, the context field of a TAG_member is updated to use the
scope reference. Verifier is updated accordingly.

DebugInfoFinder now needs to generate a type identifier map to have
access to the actual scope. Same applies for BreakpointPrinter.

processModule of DebugInfoFinder is called during initialization phase
of the verifier to make sure the type identifier map is constructed early
enough.

We are now able to unique a simple class as demonstrated by the added
testing case.

llvm-svn: 190334

10 years ago[docs] Typographical and rewording fixes.
Sean Silva [Mon, 9 Sep 2013 19:30:44 +0000 (19:30 +0000)]
[docs] Typographical and rewording fixes.

llvm-svn: 190333

10 years agoRename GnuLDInputGraph.h -> GnuLdInputGraph.h for consistency with other files.
Rui Ueyama [Mon, 9 Sep 2013 19:30:23 +0000 (19:30 +0000)]
Rename GnuLDInputGraph.h -> GnuLdInputGraph.h for consistency with other files.

llvm-svn: 190332

10 years agoUpdate CMake file to fix buildbots.
Bob Wilson [Mon, 9 Sep 2013 19:25:11 +0000 (19:25 +0000)]
Update CMake file to fix buildbots.

llvm-svn: 190331

10 years agoDebug Info: move DIScope::getContext to DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 19:23:58 +0000 (19:23 +0000)]
Debug Info: move DIScope::getContext to DwarfDebug.

DIScope::getContext is a wrapper function that calls the specific getContext
method on each subclass. When we switch DIType::getContext to return DIScopeRef
instead of DIScope, DIScope::getContext can no longer return a DIScope without
a type identifier map.

DIScope::getContext is only used by DwarfDebug, so we move it to DwarfDebug
to have easy access to the type identifier map.

llvm-svn: 190330

10 years agoUse _isWholeArchive to silence -Wunused-private-field warning.
Rui Ueyama [Mon, 9 Sep 2013 19:21:06 +0000 (19:21 +0000)]
Use _isWholeArchive to silence -Wunused-private-field warning.

llvm-svn: 190329

10 years agoRevert patches to add case-range support for PR1255.
Bob Wilson [Mon, 9 Sep 2013 19:14:35 +0000 (19:14 +0000)]
Revert patches to add case-range support for PR1255.

The work on this project was left in an unfinished and inconsistent state.
Hopefully someone will eventually get a chance to implement this feature, but
in the meantime, it is better to put things back the way the were.  I have
left support in the bitcode reader to handle the case-range bitcode format,
so that we do not lose bitcode compatibility with the llvm 3.3 release.

This reverts the following commits: 155464, 156374, 156377, 156613, 156704,
156757, 156804 156808, 156985, 157046, 157112, 157183, 157315, 157384, 157575,
157576, 157586, 157612, 157810, 157814, 157815, 157880, 157881, 157882, 157884,
157887, 157901, 158979, 157987, 157989, 158986, 158997, 159076, 159101, 159100,
159200, 159201, 159207, 159527, 159532, 159540, 159583, 159618, 159658, 159659,
159660, 159661, 159703, 159704, 160076, 167356, 172025, 186736

llvm-svn: 190328

10 years ago[docs] Fix Sphinx warning.
Sean Silva [Mon, 9 Sep 2013 19:13:28 +0000 (19:13 +0000)]
[docs] Fix Sphinx warning.

Adornments need to be at least as long as the thing they adorn.

llvm-svn: 190327

10 years ago[docs] Fix some Sphinx toctree warnings.
Sean Silva [Mon, 9 Sep 2013 19:09:00 +0000 (19:09 +0000)]
[docs] Fix some Sphinx toctree warnings.

llvm-svn: 190326

10 years agoDebug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.
Manman Ren [Mon, 9 Sep 2013 19:05:21 +0000 (19:05 +0000)]
Debug Info: Move isSubprogramContext from DebugInfo to DwarfDebug.

This helper function needs the type identifier map when we switch
DIType::getContext to return DIScopeRef instead of DIScope.

Since isSubprogramContext is used by DwarfDebug only, We move it to DwarfDebug
to have easy access to the map.

llvm-svn: 190325

10 years ago[docs] Some typographical fixes.
Sean Silva [Mon, 9 Sep 2013 19:05:03 +0000 (19:05 +0000)]
[docs] Some typographical fixes.

llvm-svn: 190324

10 years agoclang-cl: parse (but don't support) the /o flag
Hans Wennborg [Mon, 9 Sep 2013 19:04:49 +0000 (19:04 +0000)]
clang-cl: parse (but don't support) the /o flag

Apparently folks run into this (PR17097). The flag is not supported by
MSVC either, but we should parse it so we don't get confused when it occurs.

This changes the clang-cl output for "clang-cl /c /o foo.obj" from:

  clang-cl.exe: error: no such file or directory: '/o'
  clang-cl.exe: error: no such file or directory: 'foo.obj'

to:

  clang-cl.exe: warning: argument unused during compilation: '/o bajs.obj'

llvm-svn: 190323

10 years agoDebug Info: Rename DITypeRef to DIScopeRef.
Manman Ren [Mon, 9 Sep 2013 19:03:51 +0000 (19:03 +0000)]
Debug Info: Rename DITypeRef to DIScopeRef.

A reference to a scope is more general than a reference to a type since
DIType is a subclass of DIScope.

A reference to a type can be either an identifier for the type or
the DIType itself, while a reference to a scope can be either an
identifier for the type (when the scope is indeed a type) or the
DIScope itself. A reference to a type and a reference to a scope
will be resolved in the same way. The only difference is in the
verifier when a field is a reference to a type (i.e. the containing
type field of a DICompositeType) or a field is a reference to a scope
(i.e. the context field of a DIType).

This is to get ready for switching DIType::getContext to return
DIScopeRef instead of DIScope.

Tighten up isTypeRef and isScopeRef to make sure the identifier is not
empty and the MDNode is DIType for TypeRef and DIScope for ScopeRef.

llvm-svn: 190322

10 years agoDebug Info: Update isScope to make sure DIType is a scope and
Manman Ren [Mon, 9 Sep 2013 19:00:55 +0000 (19:00 +0000)]
Debug Info: Update isScope to make sure DIType is a scope and
TAG_file_type is also a scope.

llvm-svn: 190321

10 years agoUpdate synopsis for list/forward_list/deque to match the allocator style of existing...
Marshall Clow [Mon, 9 Sep 2013 18:19:45 +0000 (18:19 +0000)]
Update synopsis for list/forward_list/deque to match the allocator style of existing comment. No code change

llvm-svn: 190320

10 years agoApply Linux C++ global/anonymous function call workound to FreeBSD as well
Ed Maste [Mon, 9 Sep 2013 18:00:45 +0000 (18:00 +0000)]
Apply Linux C++ global/anonymous function call workound to FreeBSD as well

The workaround was introduced in SVN r181613, for http://llvm.org/pr15854

llvm-svn: 190319

10 years ago[mips] When double precision loads and stores are split into two i32 loads and
Akira Hatanaka [Mon, 9 Sep 2013 17:59:32 +0000 (17:59 +0000)]
[mips] When double precision loads and stores are split into two i32 loads and
stores, make sure the load or store that accesses the higher half does not have
an alignment that is larger than the offset from the original address.

llvm-svn: 190318

10 years ago[stackprotector] Modernize code with IRBuilder
Benjamin Kramer [Mon, 9 Sep 2013 17:38:01 +0000 (17:38 +0000)]
[stackprotector] Modernize code with IRBuilder

llvm-svn: 190317

10 years agoMove checker downloads to llvm.org.
Ted Kremenek [Mon, 9 Sep 2013 17:19:27 +0000 (17:19 +0000)]
Move checker downloads to llvm.org.

llvm-svn: 190316

10 years agoC++ modules: if a class is defined in multiple modules (for instance, because
Richard Smith [Mon, 9 Sep 2013 16:55:27 +0000 (16:55 +0000)]
C++ modules: if a class is defined in multiple modules (for instance, because
it is an implicit instantiation of a class template specialization), pick the
first-loaded definition to be the canonical definition, and merge all other
definitions into it.

This is still rather incomplete -- we need to extend every form of declaration
that can appear within a CXXRecordDecl to be redeclarable if it came from an
AST file (this includes fields, enumerators, ...).

llvm-svn: 190315

10 years agoCGDebugInfo: Hoist string allocation in a helper function. No functionality change.
Benjamin Kramer [Mon, 9 Sep 2013 16:39:06 +0000 (16:39 +0000)]
CGDebugInfo: Hoist string allocation in a helper function. No functionality change.

llvm-svn: 190314

10 years agoSema: Don't crash on visibility attributes with an identifier argument.
Benjamin Kramer [Mon, 9 Sep 2013 15:08:57 +0000 (15:08 +0000)]
Sema: Don't crash on visibility attributes with an identifier argument.

PR17105.

llvm-svn: 190312

10 years agoFix constructor-related typos.
Benjamin Kramer [Mon, 9 Sep 2013 14:48:42 +0000 (14:48 +0000)]
Fix constructor-related typos.

Noticed by Roman Divacky.

llvm-svn: 190311

10 years agoParenthesize arguments for mad_hi
Aaron Watry [Mon, 9 Sep 2013 14:36:21 +0000 (14:36 +0000)]
Parenthesize arguments for mad_hi

Thanks to Jordon Rose <jordan_rose@apple.com> for pointing this out.

llvm-svn: 190310

10 years ago[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
Joey Gouly [Mon, 9 Sep 2013 14:21:49 +0000 (14:21 +0000)]
[ARMv8] Prevent generation of deprecated IT blocks on ARMv8 in Thumb mode.
IT blocks can only be one instruction lonf, and can only contain a subset of
the 16 instructions.

Patch by Artyom Skrobov!

llvm-svn: 190309

10 years agoA better way to silence the warning in MSVC (replaces r190304).
Aaron Ballman [Mon, 9 Sep 2013 14:17:30 +0000 (14:17 +0000)]
A better way to silence the warning in MSVC (replaces r190304).

llvm-svn: 190308

10 years agotest: Handle libc++ shared lib name on FreeBSD
Ed Maste [Mon, 9 Sep 2013 14:04:04 +0000 (14:04 +0000)]
test: Handle libc++ shared lib name on FreeBSD

(I didn't take a guess at the Linux names, as these tests are currently
skipped with the comment "No standard locations for libc++ on Linux.")

llvm-svn: 190307

10 years ago[msan] Intercept fstatat / fstatat64.
Evgeniy Stepanov [Mon, 9 Sep 2013 13:40:41 +0000 (13:40 +0000)]
[msan] Intercept fstatat / fstatat64.

llvm-svn: 190306

10 years agoSilencing an MSVC warning about an empty control statement (it dislikes ; but is...
Aaron Ballman [Mon, 9 Sep 2013 13:29:38 +0000 (13:29 +0000)]
Silencing an MSVC warning about an empty control statement (it dislikes ; but is fine with {}).

llvm-svn: 190305

10 years agoSilencing a warning about control flow reaching the end of a non-void function.
Aaron Ballman [Mon, 9 Sep 2013 13:22:45 +0000 (13:22 +0000)]
Silencing a warning about control flow reaching the end of a non-void function.

llvm-svn: 190304