Commit Graph

157483 Commits

Author SHA1 Message Date
Timur Iskhodzhanov 92702d8401 [ASan] Remove the explicit function prototypes for intercepted functions on Windows
llvm-svn: 190411
2013-09-10 14:42:15 +00:00
Alexey Samsonov 7a36e6126b [Sanitizer] Refactor symbolization interface: use class instead of several functions. Move some code around to get rid of extra source files
llvm-svn: 190410
2013-09-10 14:36:16 +00:00
Renato Golin 74c652eb3f Adding LZMA as dep for XML2 on 2.8.0 or higher
LibXML2 config doesn't specify lzma as a dependency, which breaks
cross-compilation builds using new linkers (ld 2.21 or higher).

There is a bug on libxml2 to fix that, but since it's going to take
a while for things to go round and back, so we should have a harmless
addition of the library until then.

llvm-svn: 190409
2013-09-10 14:24:17 +00:00
Alexander Kornienko d8d47fa504 Don't divide L and #x in macro definitions. Fixes http://llvm.org/PR17144
Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek

Differential Revision: http://llvm-reviews.chandlerc.com/D1639

llvm-svn: 190408
2013-09-10 13:41:43 +00:00
Kostya Serebryany 6805de5467 [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
2013-09-10 13:16:56 +00:00
Kostya Serebryany 8fc35ca008 [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
2013-09-10 13:16:26 +00:00
Alexander Kornienko 917f9e04b5 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
2013-09-10 12:29:48 +00:00
Richard Sandiford 0e0498b288 [SystemZ] Update README.
llvm-svn: 190404
2013-09-10 12:22:45 +00:00
Evgeniy Stepanov 2b31d7186e [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
2013-09-10 11:54:51 +00:00
Evgeniy Stepanov df96e863de [msan] bool -> int to make msan_interface.h C-compatible.
llvm-svn: 190402
2013-09-10 11:04:37 +00:00
Daniel Jasper 71665cd1fd 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
2013-09-10 10:26:38 +00:00
Richard Sandiford a9eb9972e4 [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
2013-09-10 10:20:32 +00:00
Daniel Sanders 3615c45d76 [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
2013-09-10 10:10:39 +00:00
Daniel Sanders f561730af8 [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
2013-09-10 09:51:43 +00:00
Vladimir Medic 65cd57445e Add test cases for Mips mthc1/mfhc1 instructions. Add check for odd value of register when PFU is 32 bit.
llvm-svn: 190397
2013-09-10 09:50:01 +00:00
Vladimir Medic 8826970632 Remove obsolete code from MipsAsmParser.cpp.
llvm-svn: 190396
2013-09-10 09:39:55 +00:00
Alexander Kornienko 39856b71a6 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
2013-09-10 09:38:25 +00:00
Alexey Samsonov 3767ccf318 Delete unused static class members
llvm-svn: 190394
2013-09-10 09:26:48 +00:00
Stepan Dyatkovskiy c250d23c06 Rejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental.
llvm-svn: 190393
2013-09-10 08:37:22 +00:00
Timur Iskhodzhanov 190784b21b [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
2013-09-10 08:36:21 +00:00
Stepan Dyatkovskiy f16ade7604 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
2013-09-10 08:18:44 +00:00
David Tweed 6c2149b3e5 Fix minor coding style issue in r190296 pointed out by Richard Smith.
llvm-svn: 190390
2013-09-10 08:00:34 +00:00
Michael Gottesman e0bc30284c [python-bindings] Changed test_memory_buffer_create_from_file to just use the generic provided test_file instead of a binary.
llvm-svn: 190389
2013-09-10 06:58:00 +00:00
Michael Gottesman f125e00e37 [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
2013-09-10 06:57:57 +00:00
Craig Topper 7481d8aa17 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
2013-09-10 06:55:47 +00:00
NAKAMURA Takumi 0229e3557e MCObjectFileInfo.cpp: Fix a couple of possible typo(s), s/DwarfPub/DwarfGnuPub/, in r190344.
XFAIL can be removed. (in r190374)

llvm-svn: 190386
2013-09-10 06:01:56 +00:00
Nick Lewycky b39be1f38e Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.

llvm-svn: 190385
2013-09-10 05:14:39 +00:00
Tobias Grosser e2622c2acc 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
2013-09-10 04:47:19 +00:00
Eli Friedman abc1a5cb9b Delete unused variables.
llvm-svn: 190383
2013-09-10 03:27:07 +00:00
Eli Friedman 5ef2175866 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
2013-09-10 03:05:56 +00:00
Jim Ingham df0ae22f92 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
2013-09-10 02:09:47 +00:00
Jim Ingham df59c4a937 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
2013-09-10 02:06:17 +00:00
Peter Collingbourne 0dca2e5ed1 [dfsan] Initial set of DFSAN_OPTIONS flags.
llvm-svn: 190379
2013-09-10 01:51:35 +00:00
Hans Wennborg 81f74480b3 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
2013-09-10 01:07:07 +00:00
Reid Kleckner 76808056f9 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
2013-09-10 01:04:45 +00:00
Matt Arsenault d232222f34 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
2013-09-10 00:41:56 +00:00
Matt Arsenault f631f8c640 Use StringRef::npos for StringRef instead of std::string one
llvm-svn: 190375
2013-09-10 00:41:53 +00:00
NAKAMURA Takumi a21c2386f6 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
2013-09-10 00:28:23 +00:00
Bill Wendling f27e331510 Revert r190366. It was breaking build bots.
llvm-svn: 190373
2013-09-10 00:20:27 +00:00
Fariborz Jahanian 9d5fffb425 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
2013-09-09 23:56:14 +00:00
Marshall Clow 9735f1a06b Add ability to set OPTIONS for compile
llvm-svn: 190371
2013-09-09 23:53:08 +00:00
Aaron Ballman 5f05a6cbbf Attempting to unbreak the makefile-base builds.
llvm-svn: 190370
2013-09-09 23:50:01 +00:00
Aaron Ballman febff0cdfb Adding a FIXME based on feedback from Richard Smith.
llvm-svn: 190369
2013-09-09 23:40:31 +00:00
Aaron Ballman 8ee40b7264 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
2013-09-09 23:33:17 +00:00
Andrew Trick 6c88b35090 Enable -misched-cyclicpath by default.
llvm-svn: 190367
2013-09-09 23:31:14 +00:00
Bill Wendling b07305fcd4 Use a default value for the prologue's debug location.
llvm-svn: 190366
2013-09-09 23:28:15 +00:00
Richard Mitton b6d18beec8 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
2013-09-09 23:17:40 +00:00
Manman Ren 15b2abf229 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
2013-09-09 23:07:58 +00:00
Manman Ren de897a369a 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
2013-09-09 22:35:23 +00:00
Enrico Granata fff258976d <rdar://problem/14728845>
Making the --timeout (-t) option to "platform shell" work for real

llvm-svn: 190361
2013-09-09 22:35:18 +00:00