Commit Graph

143395 Commits

Author SHA1 Message Date
Aaron Ballman cd9e4e6063 Removing a signed/unsigned mismatch warning triggered in MSVC 11.
llvm-svn: 174986
2013-02-12 18:39:15 +00:00
Dan Gohman f60667020a Minor code simplification.
llvm-svn: 174985
2013-02-12 18:38:36 +00:00
Matt Kopec 92dd5cfe04 Fix ELF parsing where undefined symbols were being added to the symbol table with the incorrect symbol type.
llvm-svn: 174984
2013-02-12 18:30:30 +00:00
Chad Rosier f72d06a919 [ms-inline asm] Add support for lexing binary integers with a [bB] suffix.
This is complicated by backward labels (e.g., 0b can be both a backward label
and a binary zero).  The current implementation assumes [0-9]b is always a
label and thus it's possible for 0b and 1b to not be interpreted correctly for
ms-style inline assembly.  However, this is relatively simple to fix in the
inline assembly (i.e., drop the [bB]).

This patch also limits backward labels to [0-9]b, so that only 0b and 1b are
ambiguous.
Part of rdar://12470373

llvm-svn: 174983
2013-02-12 18:29:02 +00:00
Dmitri Gribenko 1c3e3c1433 Documentation: HowToUseAttributes: formatting (use monospaced font)
llvm-svn: 174982
2013-02-12 18:26:08 +00:00
Krzysztof Parzyszek 228daa6986 Allow optionally generating pubnames section in DWARF info. Introduce
option "generate-dwarf-pubnames" to control it, set to "false" by default.

llvm-svn: 174981
2013-02-12 18:00:14 +00:00
Dmitri Gribenko d1c91f1763 Accept over-qualified constructor in MSVC emulation mode
MSVC accepts this:

class A {
  A::A();
};

Clang accepts regular member functions with extra qualification as an MS
extension, but not constructors.  This changes the parser to defer rejecting
qualified constructors so that the same Sema logic can apply to constructors as
regular member functions.  This also improves the error message when MS
extensions are disabled (in my opinion). Before it was:

/Users/jason/Desktop/test.cpp:2:8: error: expected member name or ';' after declaration specifiers
  A::A();
  ~~~~ ^
1 error generated.

After:

/Users/jason/Desktop/test.cpp:2:6: error: extra qualification on member 'A'
  A::A();
  ~~~^
1 error generated.

Patch by Jason Haslam.

llvm-svn: 174980
2013-02-12 17:27:41 +00:00
Kay Tiong Khoo c5c9713fcf added test cases for r174920 (prefetch disassembly)
llvm-svn: 174979
2013-02-12 17:07:44 +00:00
Daniel Jasper 2204562acd Fix bug in the adjustment to existing lines.
Before (if only the second line was reformatted):
void f() {}
          void g() {}

After:
void f() {}
void g() {}

llvm-svn: 174978
2013-02-12 16:51:23 +00:00
Sergei Larin 5e76aa9714 Equal treatment of labels and other terminators in MI DAG construction.
MI sched DAG construction allows targets to include terminators into scheduling DAG.
Extend this functionality to labels as well.

llvm-svn: 174977
2013-02-12 16:36:03 +00:00
Krzysztof Parzyszek 97438dc75e Add support for the pubnames section to llvm-dwarfdump.
llvm-svn: 174976
2013-02-12 16:20:28 +00:00
Nico Weber 4444917f5c Formatter: Correctly format stars in `sizeof(int**)` and similar places.
This redoes how '*' and '&' are classified as pointer / reference markers when
followed by ')', '>', or ','.

Previously, determineStarAmpUsage() marked a single '*' and '&' followed by
')', '>', or ',' as pointer or reference marker. Now, all '*'s and '&'s
preceding ')', '>', or ',' are marked as pointer / reference markers. Fixes
PR14884.

Since only the last '*' in 'int ***' was marked as pointer before (the rest
were unary operators, which don't reach spaceRequiredBetween()),
spaceRequiredBetween() now had to be thought about handing multiple '*'s in
sequence.

Before:
  return sizeof(int * *);
  Type **A = static_cast<Type * *>(P);

Now:
  return sizeof(int**);
  Type **A = static_cast<Type **>(P);

While here, also make all methods of AnnotatingParser except parseLine()
private.

Review URL: http://llvm-reviews.chandlerc.com/D384

llvm-svn: 174975
2013-02-12 16:17:07 +00:00
Paul Redmond 7e7e3de43d Fix the lit test added in r174972
Patch by: Kevin Schoedel

llvm-svn: 174974
2013-02-12 16:07:27 +00:00
Jyotsna Verma 39f7a2b7a0 Hexagon: Add support to generate predicated absolute addressing mode
instructions.

llvm-svn: 174973
2013-02-12 16:06:23 +00:00
Paul Redmond 288604ed0c PR14562 - Truncation of left shift became undef
DAGCombiner::ReduceLoadWidth was converting (trunc i32 (shl i64 v, 32))
into (shl i32 v, 32) into undef. To prevent this, check the shift count
against the final result size.

Patch by: Kevin Schoedel
Reviewed by: Nadav Rotem

llvm-svn: 174972
2013-02-12 15:21:21 +00:00
Evgeniy Stepanov 71a4ab7141 [sanitizer] Tests for scanf parser in allowGnuMalloc=false mode.
llvm-svn: 174971
2013-02-12 14:37:55 +00:00
Evgeniy Stepanov e676f66fe3 [msan] Allow zero buf pointer in getcwd() interceptor.
llvm-svn: 174970
2013-02-12 14:36:22 +00:00
Evgeniy Stepanov b5ec3a2d55 [sanitizer] More accurate scanf parsing without GNU extensions.
In __isoc99_*scanf we don't have to worry about GNUisms, and can parse
%a accurately.

Patch by Jakub Jelinek.

llvm-svn: 174969
2013-02-12 14:29:34 +00:00
Justin Holewinski be8dc6499a [NVPTX] Disable vector registers
Vectors were being manually scalarized by the backend.  Instead,
let the target-independent code do all of the work.  The manual
scalarization was from a time before good target-independent support
for scalarization in LLVM. However, this forces us to specially-handle
vector loads and stores, which we can turn into PTX instructions that
produce/consume multiple operands.

llvm-svn: 174968
2013-02-12 14:18:49 +00:00
Edwin Vane e9dd3608ea Adding more overloads for allOf matcher
Adding overloads of allOf accepting 4 and 5 arguments.
    
Reviewer: klimek

llvm-svn: 174967
2013-02-12 13:55:40 +00:00
Timur Iskhodzhanov 584248cf3c Rename -constructors test to just -structors as in fact it tests dtors too. Also, fix a minor typo in the test.
llvm-svn: 174966
2013-02-12 13:22:47 +00:00
Evgeniy Stepanov a73704c0f8 [asan] Add new __isoc99_*scanf to ASan intercepted functions list.
llvm-svn: 174965
2013-02-12 12:45:29 +00:00
Alexander Potapenko 259e8127ad [ASan] Do not use kDefaultShort64bitShadowOffset on Mac, where the binaries may get mapped at 0x100000000+ and thus may interleave with the shadow.
llvm-svn: 174964
2013-02-12 12:41:12 +00:00
Michel Danzer 3bb17ebd93 R600: Fix regression with shadow array sampler on pre-SI GPUs.
'R600/SI: Use proper instructions for array/shadow samplers.' removed two
cases from TEX_SHADOW. Vincent Lejeune reported on IRC that this broke some
shadow array piglit tests with the r600g driver. Reinstating the removed
cases should fix this, and still works with radeonsi as well.

I will follow up with some lit tests which would have caught the regression.

NOTE: This is a candidate for the Mesa stable branch.

Tested-by: Vincent Lejeune <vljn@ovi.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174963
2013-02-12 12:11:23 +00:00
Evgeniy Stepanov d8cfb99a71 [sanitizer] Missing changes from r174960.
llvm-svn: 174962
2013-02-12 12:02:49 +00:00
Joe Abbey ba3e901e14 Adding a HowTo for Attributes.
This is based on Bill Wendling's email.  No additional content has been added,
but now there's a place for Attributes to capture future information.

llvm-svn: 174961
2013-02-12 11:45:22 +00:00
Evgeniy Stepanov 5fa8fb7d91 [sanitizer] Intercept __isoc99_*scanf.
llvm-svn: 174960
2013-02-12 11:34:52 +00:00
Kostya Serebryany e2e32b32e8 [asan] fix tests for the new ABI
llvm-svn: 174959
2013-02-12 11:14:24 +00:00
Kostya Serebryany 2659e96e4b [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. compiler-rt part
llvm-svn: 174958
2013-02-12 11:11:58 +00:00
Kostya Serebryany be73337ad2 [asan] change the default mapping offset on x86_64 to 0x7fff8000. This gives roughly 5% speedup. Since this is an ABI change, bump the asan ABI version by renaming __asan_init to __asan_init_v1. llvm part, compiler-rt part will follow
llvm-svn: 174957
2013-02-12 11:11:02 +00:00
Alexey Samsonov 93686fc6f1 [MSan] symbolize correct PC when printing Summary message
llvm-svn: 174956
2013-02-12 10:46:39 +00:00
Bill Wendling 59dce37a82 Merge the collected attributes into the call instruction's attributes.
llvm-svn: 174955
2013-02-12 10:13:06 +00:00
Bill Wendling 7321fec934 Test for string attributes and for attribute group output.
llvm-svn: 174954
2013-02-12 09:14:20 +00:00
Nick Lewycky 94477cb084 Attempt to fix this test on i686 targets.
llvm-svn: 174953
2013-02-12 08:59:01 +00:00
Bill Wendling 0dc08915d2 Have the bitcode writer and reader handle the new attribute references.
The bitcode writer emits a reference to the attribute group that the object at
the given index refers to. The bitcode reader is modified to read this in and
map it back to the attribute group.

llvm-svn: 174952
2013-02-12 08:13:50 +00:00
Nick Lewycky a096b14d1d The meat of this patch is in BuildCXXMemberCalLExpr where we make it use
MarkMemberReferenced instead of marking functions referenced directly. An audit
of callers to MarkFunctionReferenced and DiagnoseUseOfDecl also caused a few
other changes:
 * don't mark functions odr-used when considering them for an initialization
   sequence. Do mark them referenced though.
 * the function nominated by the cleanup attribute should be diagnosed.
 * operator new/delete should be diagnosed when building a 'new' expression.

llvm-svn: 174951
2013-02-12 08:08:54 +00:00
Bill Wendling 7b5f4f3fac Use the AttributeSet as the 'key' to the map instead of the 'raw' pointer.
llvm-svn: 174950
2013-02-12 08:01:22 +00:00
Sean Callanan eeffea416b Made LLDB build with the latest Clang. This meant
changing the ClangASTSource to return a bool instead
of returning a list of results.  Our testsuite mostly
works with this change, but some minor issues may
remain both on LLDB's side and on Clang's side.

llvm-svn: 174949
2013-02-12 08:01:13 +00:00
Bill Wendling 7cde51d843 Support string attributes in the AttrBuilder.
llvm-svn: 174948
2013-02-12 07:56:49 +00:00
Sean Callanan af77617b21 Fixed the way the ClangExpressionDeclMap looks
up variables in the current stack frame to avoid
mutual recursion between the expression parser
and the synthetic child providers.  Variables
should only be looked up in a very simple way,
using no synthetic anything.

<rdar://problem/13173454>

llvm-svn: 174947
2013-02-12 07:56:36 +00:00
John McCall 3d1e2c960d Properly assemble PHIs after a null-checked invoke of objc_msgSend.
rdar://12046763

llvm-svn: 174946
2013-02-12 05:53:35 +00:00
Cameron Zwarich 7c85c9433c Don't consider definitions by other PHIs live-in when trimming a PHI source's
live range after inserting a copy at the end of a block.

llvm-svn: 174945
2013-02-12 05:48:58 +00:00
Cameron Zwarich 4ee9aef208 Fix indentation.
llvm-svn: 174944
2013-02-12 05:48:56 +00:00
Richard Smith 8858159fb5 Fix a bug reduced from a crash when trying to use modules with libc++. We check
the linkage of functions and variables while merging declarations from modules,
and we don't necessarily have enough of the rest of the AST loaded at that
point to allow us to compute linkage, so serialize it instead.

llvm-svn: 174943
2013-02-12 05:48:23 +00:00
Anton Yartsev 277775b8af + specified progress information
llvm-svn: 174942
2013-02-12 05:02:54 +00:00
Anton Yartsev 19802a709a + centered progress cells
+ added progress information for several checkers

llvm-svn: 174941
2013-02-12 04:45:48 +00:00
John McCall e142ad50f1 Call __cxa_begin_catch with the current exception before
calling std::terminate().  rdar://11904428

llvm-svn: 174940
2013-02-12 03:51:46 +00:00
John McCall 2c33ba8cae Change some CGF parameters to CGMs.
llvm-svn: 174939
2013-02-12 03:51:38 +00:00
Cameron Zwarich 15eb925ed4 Add a hidden option to PHIElimination to split all critical edges. This is
particularly useful for catching issues with architectures that have exotic
terminators like MIPS.

llvm-svn: 174938
2013-02-12 03:49:25 +00:00
Cameron Zwarich 6d7a4e0c9c Renumber SlotIndexes locally when a new block is inserted.
llvm-svn: 174937
2013-02-12 03:49:22 +00:00