Yaron Keren [Wed, 18 Mar 2015 10:30:57 +0000 (10:30 +0000)]
Fix another ternary Visual C++ is OK wiht but gcc not.
llvm-svn: 232624
Yaron Keren [Wed, 18 Mar 2015 10:26:22 +0000 (10:26 +0000)]
Fix gcc ambiguity error (Visual C++ was OK with these).
llvm-svn: 232623
Yaron Keren [Wed, 18 Mar 2015 10:17:07 +0000 (10:17 +0000)]
Remove many superfluous SmallString::str() calls.
Now that SmallString is a first-class citizen, most SmallString::str()
calls are not required. This patch removes a whole bunch of them, yet
there are lots more.
There are two use cases where str() is really needed:
1) To use one of StringRef member functions which is not available in
SmallString.
2) To convert to std::string, as StringRef implicitly converts while
SmallString do not. We may wish to change this, but it may introduce
ambiguity.
llvm-svn: 232622
Hafiz Abid Qadeer [Wed, 18 Mar 2015 10:07:46 +0000 (10:07 +0000)]
Make lldb-mi handle only MI commands
Summary:
Previously lldb-mi can also act as a driver like normal lldb. It needed a lot
of redundant code in the lldb-mi for that. I think that if a user wants command
line lldb driver then he/she should use the lldb for it. This change will cleanup
the code a lot. When this change goes in, it will allow us to remove some more
redundant code too.
All tests pass on Linux. Did some sanity testing on command line and with eclipse.
Reviewers: ki.stfu
Reviewed By: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8381
llvm-svn: 232621
Pavel Labath [Wed, 18 Mar 2015 09:57:10 +0000 (09:57 +0000)]
Fix a typo in EmulateInstructioinMIPS64
llvm-svn: 232620
Bhushan D. Attarde [Wed, 18 Mar 2015 09:21:29 +0000 (09:21 +0000)]
Initial Assembly profiler for mips64
Summary:
This is initial implementation of assembly profiler which only scans prologue/epilogue assembly instructions to create CFI instructions.
Reviewers: clayborg, jasonmolenda
Differential Revision: http://reviews.llvm.org/D7696
llvm-svn: 232619
Ilia K [Wed, 18 Mar 2015 09:14:49 +0000 (09:14 +0000)]
Clean up CommandObjectBreakpointNameList: remove duplicated 'protected' access modifier
llvm-svn: 232618
Peter Collingbourne [Wed, 18 Mar 2015 08:34:40 +0000 (08:34 +0000)]
llgoi: Fix type identity for imported binary packages.
go/loader creates a fresh package map for each source package it imports. In
llgoi this caused binary imported packages to be imported anew for every input
line, resulting in spurious type errors and panics in go/ssa when encountering
previously imported types. Fix this by setting types.Config.Packages to our
internal package map.
Differential Revision: http://reviews.llvm.org/D8409
llvm-svn: 232617
David Majnemer [Wed, 18 Mar 2015 07:53:20 +0000 (07:53 +0000)]
Lex: Don't call getIdentifierInfo on annotation tokens
These calls are usually guarded by checks for isAnnotation() but it
looks like we missed a spot. This would cause the included test to
crash clang.
llvm-svn: 232616
David Majnemer [Wed, 18 Mar 2015 07:53:18 +0000 (07:53 +0000)]
MS ABI: Define _HAS_CHAR16_T_LANGUAGE_SUPPORT when appropriate
If we are in MSVC 2015 compatibility mode and C++11 language conformance
is enabled, define _HAS_CHAR16_T_LANGUAGE_SUPPORT to 1.
llvm-svn: 232615
Peter Collingbourne [Wed, 18 Mar 2015 07:35:17 +0000 (07:35 +0000)]
Add llgo-go to installation.
llvm-svn: 232614
Kai Nacke [Wed, 18 Mar 2015 06:28:38 +0000 (06:28 +0000)]
[mips] Add itineraries for ext and ins instructions.
Currently, there are no itineraries defined for ext and ins instructions.
This patch adds these itineraries and uses them in the instruction definitions.
Reviewed By: dsanders
Differential Revision: http://reviews.llvm.org/D7209
llvm-svn: 232613
Peter Collingbourne [Wed, 18 Mar 2015 06:04:22 +0000 (06:04 +0000)]
llgoi: Fix importing source packages together with dependent binary packages.
Note that this means that llgoi does not support the case
where a package's pkgpath is different from its import path,
but I don't think this should actually happen with llgoi.
Differential Revision: http://reviews.llvm.org/D8403
llvm-svn: 232612
David Majnemer [Wed, 18 Mar 2015 04:15:23 +0000 (04:15 +0000)]
MSVC Compat: Permit char16_t, char32_t and _Atomic when targeting > 2013
We disabled support for _Atomic because the STL had name conflicts,
they've been resolved in 2015. Similarly, reenable char16_t and
char32_t.
llvm-svn: 232611
Alexey Bataev [Wed, 18 Mar 2015 04:13:55 +0000 (04:13 +0000)]
[OPENMP] Fix crash on code emitting if errors are found.
Codegen for threadprivate variables (and in some other cases) may cause crash of the compiler if some diagnostic is produced later. This happens because some of the autogenerated globals are not removed from InternalVars StringMap when llvm::Module is reset.
Differential Revision: http://reviews.llvm.org/D8360
llvm-svn: 232610
David Majnemer [Wed, 18 Mar 2015 03:56:27 +0000 (03:56 +0000)]
MS ABI: Empty pack expansions had their mangling changed in 2013->2015
We used to support the 2013 mangling and changed it to the more
reasonable 2015 mangling. Let's make the mangling conditional on what
version of MSVC is targeted.
This fixes PR21888.
llvm-svn: 232609
NAKAMURA Takumi [Wed, 18 Mar 2015 02:09:25 +0000 (02:09 +0000)]
Split comma-separated \param(s). [-Wdocumentation]
llvm-svn: 232584
Richard Smith [Wed, 18 Mar 2015 01:42:29 +0000 (01:42 +0000)]
Make module files passed to a module build via -fmodule-file= available to
consumers of that module.
Previously, such a file would only be available if the module happened to
actually import something from that module.
llvm-svn: 232583
NAKAMURA Takumi [Wed, 18 Mar 2015 01:41:58 +0000 (01:41 +0000)]
Fix test in release mode. This reapplies r232456, corresponding to r232579.
llvm-svn: 232582
Alexei Starovoitov [Wed, 18 Mar 2015 01:39:40 +0000 (01:39 +0000)]
[bpf] fix build
fix BPF backend build broken by r232429
Patch by Brenden Blanco
llvm-svn: 232581
Josh Magee [Wed, 18 Mar 2015 01:34:06 +0000 (01:34 +0000)]
Add testcases for BEXTR.
These BEXTR cases are a check for the 64-bit load form and two negative cases where the bitrange is non-contiguous. From a private patch equivalent to r189742/PR17028.
llvm-svn: 232580
Nick Lewycky [Wed, 18 Mar 2015 01:06:24 +0000 (01:06 +0000)]
Fix the LLVM type used when lowering initializer list reference temporaries to global variables. Reapplies r232454 with fix for PR22940.
llvm-svn: 232579
Krzysztof Parzyszek [Wed, 18 Mar 2015 00:44:46 +0000 (00:44 +0000)]
Missed testcase for r232577
llvm-svn: 232578
Krzysztof Parzyszek [Wed, 18 Mar 2015 00:43:46 +0000 (00:43 +0000)]
Generate bit manipulation instructions on Hexagon
llvm-svn: 232577
Sanjoy Das [Wed, 18 Mar 2015 00:41:29 +0000 (00:41 +0000)]
[SCEV] Make isImpliedCond smarter.
Summary:
This change teaches isImpliedCond to infer things like "X sgt 0" => "X -
1 sgt -1". The `ConstantRange` class has the logic to do the heavy
lifting, this change simply gets ScalarEvolution to exploit that when
reasonable.
Depends on D8345
Reviewers: atrick
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8346
llvm-svn: 232576
Sanjoy Das [Wed, 18 Mar 2015 00:41:24 +0000 (00:41 +0000)]
[ConstantRange] Split makeICmpRegion in two.
Summary:
This change splits `makeICmpRegion` into `makeAllowedICmpRegion` and
`makeSatisfyingICmpRegion` with slightly different contracts. The first
one is useful for determining what values some expression //may// take,
given that a certain `icmp` evaluates to true. The second one is useful
for determining what values are guaranteed to //satisfy// a given
`icmp`.
Reviewers: nlewycky
Reviewed By: nlewycky
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8345
llvm-svn: 232575
Kostya Serebryany [Wed, 18 Mar 2015 00:23:44 +0000 (00:23 +0000)]
[sanitizer] add run-time a flag coverage_order_pcs. When true, the PCs are dumped in the order of their appearance
llvm-svn: 232573
David Majnemer [Wed, 18 Mar 2015 00:03:36 +0000 (00:03 +0000)]
DAGCombiner: fold (xor (shl 1, x), -1) -> (rotl ~1, x)
Targets which provide a rotate make it possible to replace a sequence of
(XOR (SHL 1, x), -1) with (ROTL ~1, x). This saves an instruction on
architectures like X86 and POWER(64).
Differential Revision: http://reviews.llvm.org/D8350
llvm-svn: 232572
David Majnemer [Tue, 17 Mar 2015 23:55:00 +0000 (23:55 +0000)]
Basic: Update clang to reflect changes made to LLVM datalayout
We now give x86-64 COFF targets a different mangling code, update clang
to use it.
llvm-svn: 232571
David Majnemer [Tue, 17 Mar 2015 23:54:51 +0000 (23:54 +0000)]
COFF: Let globals with private linkage reside in their own section
COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.
Differential Revision: http://reviews.llvm.org/D8394
llvm-svn: 232570
Krzysztof Parzyszek [Tue, 17 Mar 2015 23:54:48 +0000 (23:54 +0000)]
Remove unneeded selection functions from HexagonISelDAGToDAG
- SelectSelect, and
- SelectTruncate
llvm-svn: 232569
Kaelyn Takata [Tue, 17 Mar 2015 23:50:12 +0000 (23:50 +0000)]
Fix a crash when the size of an 'auto' is needed and its initalizer
contained a typo correction (the auto decl was being marked as dependent
unnecessarily, which triggered an assertion in cases where the size of
the type is needed).
llvm-svn: 232568
Alexey Samsonov [Tue, 17 Mar 2015 23:46:06 +0000 (23:46 +0000)]
Improve SUMMARY reporting in sanitizers.
Make sure SUMMARY is always reported unless print_summary flag is set to
false, even if symbolizer is unavailable or report stack trace is empty.
If file/line info for PC can't be evaluated, print module name/offset
like we do in stack trace.
llvm-svn: 232567
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 23:41:05 +0000 (23:41 +0000)]
docs: Update LangRef and SourceLevelDebugging
Cleanup some bitrot in SourceLevelDebugging.rst.
- Pull the still-relevant details about individual descriptors into
LangRef.rst. Cut a lot of it to avoid over-describing the fields,
as the C++ classes and assembly format are mostly self-describing
now. If there's anything specific that I shouldn't have cut, let me
know and I'll add it back.
- Rewrite the remaining sections to refer to the new debug info
hierarchy in LangRef.rst.
llvm-svn: 232566
Peter Collingbourne [Tue, 17 Mar 2015 23:17:38 +0000 (23:17 +0000)]
Add cgo dependency to llgo-stage2 and llgoi.
llvm-svn: 232564
Jason Molenda [Tue, 17 Mar 2015 23:16:42 +0000 (23:16 +0000)]
Build fix for building debugserver for ios.
llvm-svn: 232563
Pirama Arumuga Nainar [Tue, 17 Mar 2015 23:10:29 +0000 (23:10 +0000)]
Fix bug while building FP16 constant vectors for AArch64
Summary: Building FP16 constant vectors caused the FP16 data to be bitcast to i64. This patch creates a BITCAST node with the correct value, and adds a test to verify correct handling.
Reviewers: mcrosier
Reviewed By: mcrosier
Subscribers: mcrosier, jmolloy, ab, srhines, llvm-commits, rengolin, aemerson
Differential Revision: http://reviews.llvm.org/D8369
llvm-svn: 232562
NAKAMURA Takumi [Tue, 17 Mar 2015 22:55:01 +0000 (22:55 +0000)]
Appease AArch64ISelLowering.cpp miscompiled by g++-4.7.2.
I will revert this when 4.7.3 is ready.
llvm-svn: 232561
Zachary Turner [Tue, 17 Mar 2015 22:51:21 +0000 (22:51 +0000)]
Convert CRLF to LF.
I accidentally let some Windows line endings slip in. This is a
good reminder for me to use core.eol=lf.
llvm-svn: 232560
Justin Bogner [Tue, 17 Mar 2015 22:31:34 +0000 (22:31 +0000)]
MS ABI: Fix a couple of -Winconsistent-missing-override warnings
llvm-svn: 232559
Kevin Enderby [Tue, 17 Mar 2015 22:26:11 +0000 (22:26 +0000)]
Add the option -no-symbolic-operands to llvm-objdump used with -macho and
-disassemble to not symbolic operands when disassembling.
llvm-svn: 232558
Simon Pilgrim [Tue, 17 Mar 2015 22:19:08 +0000 (22:19 +0000)]
XformToShuffleWithZero - Added clearer early outs and general tidy up. NFCI
llvm-svn: 232557
Michael Zolotukhin [Tue, 17 Mar 2015 22:13:05 +0000 (22:13 +0000)]
Imply linker arguments from '-fveclib' option.
Summary: As discussed in D8097, we should provide corresponding linking flags when 'fveclib' is specified.
Reviewers: hfinkel
Differential Revision: http://reviews.llvm.org/D8362
llvm-svn: 232556
Kostya Serebryany [Tue, 17 Mar 2015 22:09:19 +0000 (22:09 +0000)]
[sanitizer] change the format of coverage dump: instead of always dumping 32-bit offsets dump 32-bit offsets on 32-bit arch and 64-bit offsets on 64-bit arch. Also add the 'bits' parameter to sancov.py. This is a user-visible interface change.
llvm-svn: 232555
Reid Kleckner [Tue, 17 Mar 2015 21:51:43 +0000 (21:51 +0000)]
MS ABI: Build C++ default argument exprs for exported template classes
This was an omission from r232229.
llvm-svn: 232554
Krzysztof Parzyszek [Tue, 17 Mar 2015 21:47:16 +0000 (21:47 +0000)]
Selection DAG preprocessing on Hexagon
Simplify: (or (select c x 0) z) -> (select c (or x z) z)
(or (select c 0 y) z) -> (select c z (or y z))
llvm-svn: 232553
Siva Chandra [Tue, 17 Mar 2015 21:43:01 +0000 (21:43 +0000)]
Enable TestDataFormatterStdIterator with GCC.
Summary:
This test now passes for Clang and GCC. I do not know why it was
disabled for GCC with link to a bug which should not have had an
effect on this test.
Test Plan: dotest.py -C gcc -p TestDataFormatterStdIterator
Reviewers: vharron
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8396
llvm-svn: 232552
Yaron Keren [Tue, 17 Mar 2015 21:33:38 +0000 (21:33 +0000)]
Remove StringRef->std::string->StringRef conversions.
As StringInit::get() accepts StringRef there is no need
to construct a std::string out of the StringRef input and
then construct a new StringRef from the std::string.
llvm-svn: 232551
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 21:32:46 +0000 (21:32 +0000)]
DebugInfo: Drop fake DW_TAG_expression
Break MDExpression off of DebugNode (inherit directly from `MDNode`) and
drop the fake `DW_TAG_expression` tag in the process.
AFAICT, there's no real functionality change here. The tag was
originally used by `DIDescriptor::isExpression()` to discriminate
between `MDNode`s, but in the new hierarchy we don't need that.
Fixes PR22780.
llvm-svn: 232550
Rafael Espindola [Tue, 17 Mar 2015 21:30:21 +0000 (21:30 +0000)]
Emit the offset directly instead of creating a dummy expression.
We were creating an expression of the form (S+C)-S which is just C.
Patch by Frédéric Riss. I just added the testcase.
llvm-svn: 232549
Siva Chandra [Tue, 17 Mar 2015 21:23:17 +0000 (21:23 +0000)]
Implement formatter for std::vector<bool, ...> of libstdc++ in Python.
Summary:
The existing formatter in C++ has been removed as it was not being used.
The associated test TestDataFormatterStdVBool.py has been enabled for
both Clang and GCC on Linux.
Test Plan: dotest.py -p TestDataFormatterStdVBool
Reviewers: vharron, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8390
llvm-svn: 232548
Kevin Enderby [Tue, 17 Mar 2015 21:07:39 +0000 (21:07 +0000)]
Add the option, -no-leading-addr llvm-objdump used with -macho and
-disassemble or -section to not print the leading addresses on each line.
llvm-svn: 232547
Sean Silva [Tue, 17 Mar 2015 21:02:37 +0000 (21:02 +0000)]
[docs] Fix some malformed links.
Patch by Stanislav Manilov!
llvm-svn: 232546
David Majnemer [Tue, 17 Mar 2015 20:41:11 +0000 (20:41 +0000)]
Revert "COFF: Let globals with private linkage reside in their own section"
This reverts commit r232539. This was committed accidently.
llvm-svn: 232543
Benjamin Kramer [Tue, 17 Mar 2015 20:40:24 +0000 (20:40 +0000)]
Internalize BitcodeReader. Not used outside of BitcodeReader.cpp.
NFC.
llvm-svn: 232542
David Majnemer [Tue, 17 Mar 2015 20:40:21 +0000 (20:40 +0000)]
Revert "Address review comments"
This reverts commit r232540. This was committed accidently.
llvm-svn: 232541
David Majnemer [Tue, 17 Mar 2015 20:39:40 +0000 (20:39 +0000)]
Address review comments
llvm-svn: 232540
David Majnemer [Tue, 17 Mar 2015 20:39:25 +0000 (20:39 +0000)]
COFF: Let globals with private linkage reside in their own section
Summary:
COFF COMDATs (for selection kinds other than 'select any') require at
least one non-section symbol in the symbol table.
Satisfy this by morally enhancing the linkage from private to internal.
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8374
llvm-svn: 232539
David Majnemer [Tue, 17 Mar 2015 20:35:05 +0000 (20:35 +0000)]
MS ABI: Emit HandlerMap entries for C++ catch
The HandlerMap describes, to the runtime, what sort of catches surround
the try. In principle, this structure has to be emitted by the backend
because only it knows the layout of the stack (the runtime needs to know
where on the stack the destination of a copy lives, etc.) but there is
some C++ specific information that the backend can't reason about.
Stick this information in special LLVM globals with the relevant
"const", "volatile", "reference" info mangled into the name.
llvm-svn: 232538
David Majnemer [Tue, 17 Mar 2015 20:35:00 +0000 (20:35 +0000)]
WIP
llvm-svn: 232537
Michael Zolotukhin [Tue, 17 Mar 2015 20:31:56 +0000 (20:31 +0000)]
Try to fix a test broken by one of my previous commits.
llvm-svn: 232536
Rafael Espindola [Tue, 17 Mar 2015 20:07:06 +0000 (20:07 +0000)]
Centralize the handling of unique ids for temporary labels.
Before this patch code wanting to create temporary labels for a given entity
(function, cu, exception range, etc) had to keep its own counter to have stable
symbol names.
createTempSymbol would still add a suffix to make sure a new symbol was always
returned, but it kept a single counter. Because of that, if we were to use
just createTempSymbol("cu_begin"), the label could change from cu_begin42 to
cu_begin43 because some other code started using temporary labels.
Simplify this by just keeping one counter per prefix and removing the various
specialized counters.
llvm-svn: 232535
Zachary Turner [Tue, 17 Mar 2015 20:04:04 +0000 (20:04 +0000)]
Remove ScriptInterpreterObject.
This removes ScriptInterpreterObject from the codebase completely.
Places that used to rely on ScriptInterpreterObject now use
StructuredData::Object and its derived classes. To support this,
a new type of StructuredData object is introduced, called
StructuredData::Generic, which stores a void*. Internally within
the python library, StructuredPythonObject subclasses this
StructuredData::Generic class so that it can addref and decref
the python object on construction and destruction.
Additionally, all of the classes in PythonDataObjects.h such
as PythonList, PythonDictionary, etc now provide a method to
create an instance of the corresponding StructuredData type. For
example, there is PythonDictionary::CreateStructuredDictionary.
To eliminate dependencies on PythonDataObjects for external
callers, all ScriptInterpreter methods now return only
StructuredData classes
The rest of the changes in this CL are focused on fixing up
users of PythonDataObjects classes to use the new StructuredData
classes.
llvm-svn: 232534
Michael Zolotukhin [Tue, 17 Mar 2015 20:03:11 +0000 (20:03 +0000)]
Add fveclib option.
Review: http://reviews.llvm.org/D8097
llvm-svn: 232533
Benjamin Kramer [Tue, 17 Mar 2015 19:53:41 +0000 (19:53 +0000)]
Internalize llvm::AssemblyWriter. It's not used outside of AsmWriter.cpp.
This is an artifact of an implementation detail of DebugIR that has been
long refactored away. NFC.
llvm-svn: 232532
Michael Zolotukhin [Tue, 17 Mar 2015 19:50:55 +0000 (19:50 +0000)]
TLI: Add addVectorizableFunctionsFromVecLib.
Also, add several entries to vectorizable functions table, and
corresponding tests. The table isn't complete, it'll be populated later.
Review: http://reviews.llvm.org/D8131
llvm-svn: 232531
Michael Zolotukhin [Tue, 17 Mar 2015 19:46:50 +0000 (19:46 +0000)]
LoopVectorize: teach loop vectorizer to vectorize calls.
The tests would be committed in a commit for http://reviews.llvm.org/D8131
Review: http://reviews.llvm.org/D8095
llvm-svn: 232530
Eric Fiselier [Tue, 17 Mar 2015 19:45:21 +0000 (19:45 +0000)]
Let libc++'s LIT configuration setup our linker paths and env.
llvm-svn: 232529
Michael Zolotukhin [Tue, 17 Mar 2015 19:37:28 +0000 (19:37 +0000)]
TTI: Honour cost model for estimating cost of vector-intrinsic and calls.
Review: http://reviews.llvm.org/D8096
llvm-svn: 232528
Eric Fiselier [Tue, 17 Mar 2015 19:37:26 +0000 (19:37 +0000)]
Fix DYNLD_LIBRARY_PATH to include the ABI path if specified
llvm-svn: 232527
Jonathan Roelofs [Tue, 17 Mar 2015 19:32:24 +0000 (19:32 +0000)]
Fix failed test command repro printing for *.pass.cpp tests
Before we were printing out the compile command twice, which isn't that useful.
Thanks EricWF for the report!
llvm-svn: 232526
Samuel Antao [Tue, 17 Mar 2015 19:31:19 +0000 (19:31 +0000)]
Add assertion to detect invalid registers in the PowerPC MC instruction lowering.
We have observed that noreg was being generated due to a bug in FastIsel and was not being detected during emission. It happens that in the Asm emission there is an assertion that detects this in getRegisterName() from the tbl-generated file PPCGenAsmWriter.inc. However, when emitting an Obj file, invalid registers can be emitted given that no check are made in getBinaryCodeFromInstr() from PPCGenMCCodeEmitter.inc. In order to cover all cases this adds an assertion for reg operands in LowerPPCMachineInstrToMCInst.
llvm-svn: 232525
Michael Zolotukhin [Tue, 17 Mar 2015 19:26:23 +0000 (19:26 +0000)]
TTI: Add getCallInstrCost.
Review: http://reviews.llvm.org/D8094
llvm-svn: 232524
Michael Zolotukhin [Tue, 17 Mar 2015 19:22:30 +0000 (19:22 +0000)]
TLI: Add interface for querying whether a function is vectorizable.
Review: http://reviews.llvm.org/D8093
llvm-svn: 232523
Michael Zolotukhin [Tue, 17 Mar 2015 19:17:18 +0000 (19:17 +0000)]
LoopVectorizer: Add TargetTransformInfo.
Review: http://reviews.llvm.org/D8092
llvm-svn: 232522
Kostya Serebryany [Tue, 17 Mar 2015 19:13:23 +0000 (19:13 +0000)]
[asan] remove redundant ifndefs. NFC
llvm-svn: 232521
Reid Kleckner [Tue, 17 Mar 2015 19:00:50 +0000 (19:00 +0000)]
MS ABI: Delay default constructor closure checking until the outermost class scope ends
Previously, we would error out on this code because the default argument
wasn't parsed until the end of Outer:
struct __declspec(dllexport) Outer {
struct __declspec(dllexport) Inner {
Inner(void *p = 0);
};
};
Now we do the checking on the closing brace of Outer instead of Inner.
llvm-svn: 232519
Eric Fiselier [Tue, 17 Mar 2015 18:58:14 +0000 (18:58 +0000)]
add option to tell LIT where to find the libc++ library when built out of tree
llvm-svn: 232518
Yaron Keren [Tue, 17 Mar 2015 18:55:30 +0000 (18:55 +0000)]
Remove LookupSymbol(StringRef) and optimize LookupSymbol(Twine).
Same as MakeArgString in r232465, keep only LookupSymbol(Twine)
while making sure it handles the StringRef like cases efficiently
using twine::toStringRef.
llvm-svn: 232517
Ed Schouten [Tue, 17 Mar 2015 18:40:58 +0000 (18:40 +0000)]
Clean up iostream creation in preparation for conditionalizing streams.
Interleave the code for narrow and wide character streams. This makes it
more obvious that the two pieces of code are identical. Furthermore, it
makes it easier to conditionally compile support for certain streams, as
less #ifdef blocks are needed.
Differential Revision: http://reviews.llvm.org/D8342
Reviewed by: marshall
llvm-svn: 232516
Eric Fiselier [Tue, 17 Mar 2015 18:28:14 +0000 (18:28 +0000)]
[libcxx] Add <experimental/tuple> header for LFTS.
Summary:
This patch adds the `<experimental/tuple>` header (almost) as specified in the latest draft of the library fundamentals TS.
The main changes in this patch are:
1. Added variable template `tuple_size_v`
2. Added function `apply(Func &&, Tuple &&)`.
3. Changed `__invoke` to be `_LIBCPP_CONSTEXPR_AFTER_CXX11`.
The `apply(...)` implementation uses `__invoke` to invoke the given function. `__invoke` already provides the required functionality. Using `__invoke` also allows `apply` to be used on pointers to member function/objects as an extension. In order to facilitate this `__invoke` has to be marked `constexpr`.
Test Plan:
Each new feature was tested.
The test cases for `tuple_size_v` are as follows:
1. tuple_size_v.pass.cpp
- Check `tuple_size_v` on cv qualified tuples, pairs and arrays.
2. tuple_size_v.fail.cpp
- Test on reference type.
3. tuple_size_v_2.fail.cpp
- Test on non-tuple
4. tuple_size_v_3.fail.cpp
- Test on pointer type.
The test cases for tuple.apply are as follows:
1. arg_type.pass.cpp
- Ensure that ref/pointer/cv qualified types are properly passed.
2. constexpr_types.pass.cpp
- Ensure constexpr evaluation of apply is possible for `tuple` and `pair`.
3. extended_types.pass.cpp
- Test apply on function types permitted by extension.
4. large_arity.pass.cpp
- Test that apply can evaluated on tuples and arrays with large sizes.
5. ref_qualifiers.pass.cpp
- Test that apply respects ref qualified functions.
6. return_type.pass.cpp
- Test that apply returns the proper type.
7. types.pass.cpp
- Test apply on function types as required by LFTS.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4512
llvm-svn: 232515
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 18:23:38 +0000 (18:23 +0000)]
Fix debug info now that the verifier is on
`i32 0` isn't a valid type, and `!{i32 0}` isn't an empty array.
Needed because of r232505.
llvm-svn: 232514
Richard Barton [Tue, 17 Mar 2015 18:20:47 +0000 (18:20 +0000)]
[ARM] Fix offset calculation in ARMBaseRegisterInfo::needsFrameBaseReg
The input offset to needsFrameBaseReg is a negative value below the top of the
stack frame, but when converting to a positive offset from the bottom of the
stack frame this value was negated, causing the final offset to be too large
by twice the input offset's magnitude. Fix that by not negating the offset.
Patch by John Brawn
Differential Revision: http://reviews.llvm.org/D8316
llvm-svn: 232513
Dmitri Gribenko [Tue, 17 Mar 2015 18:03:42 +0000 (18:03 +0000)]
Comment parsing: move a diagnostic to the correct group.
Based on a patch by LE GARREC Vincent.
llvm-svn: 232511
Michael Liao [Tue, 17 Mar 2015 18:03:10 +0000 (18:03 +0000)]
[SwitchLowering] Remove incoming values in the reverse order
- To prevent invalidating *successive* indices.
llvm-svn: 232510
Adam Nemet [Tue, 17 Mar 2015 17:51:58 +0000 (17:51 +0000)]
[docs] Fix copy-and-paste bug in def-use example
This appeared when the example was converted to use range-based loop in
r207755.
llvm-svn: 232509
David Blaikie [Tue, 17 Mar 2015 17:48:24 +0000 (17:48 +0000)]
Fix GCC -Wparentheses warning (& reformat now that the precedence is fixed)
Benign warning (clang deliberately suppresses this case) but does
regularly produce bad formatting, so it's nice to fix/reformat.
llvm-svn: 232508
David Blaikie [Tue, 17 Mar 2015 17:37:17 +0000 (17:37 +0000)]
Fix the clang -Werror build by suppressing -Wextended-offsetof
llvm-svn: 232507
Dmitry Vyukov [Tue, 17 Mar 2015 17:30:41 +0000 (17:30 +0000)]
asan: remove left-over code from submitted in rev r232501
__sanitizer_cov_hint is part of a different functionality
and was not intended to be submitted.
llvm-svn: 232506
Duncan P. N. Exon Smith [Tue, 17 Mar 2015 17:28:41 +0000 (17:28 +0000)]
Verifier: Set --verify-debug-info=true by default
r186634 started verifying debug info, and r194986 disabled it by default
because it was too expensive to run the checks on every function (since
most of the graph was reachable from each function).
r206300 moved the checks to module-level to make it cheaper, but there
was already quite a bit of testcase bitrot (and the verifier would only
print `<badref>`) so I guess no one had time to turn it back on.
This does just that. Upgrade scripts this past autumn and winter
probably fixed some of the bitrot, and this weekend I fixed the verifier
output (r232275, r232417, r232418) and thusly the remaining failing
testcases (r232290, r232415).
This is part of PR22777.
llvm-svn: 232505
David Blaikie [Tue, 17 Mar 2015 17:26:41 +0000 (17:26 +0000)]
Add missing overrides to fix the clang -Werror build (-Winconsistent-missing-override)
llvm-svn: 232504
Kevin Enderby [Tue, 17 Mar 2015 17:10:57 +0000 (17:10 +0000)]
Add the option, -dis-symname to llvm-objdump used with -macho and
-disassemble to disassemble just one symbol’s instructions.
llvm-svn: 232503
Dmitry Vyukov [Tue, 17 Mar 2015 16:59:19 +0000 (16:59 +0000)]
asan: optimization experiments
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
llvm-svn: 232502
Dmitry Vyukov [Tue, 17 Mar 2015 16:59:11 +0000 (16:59 +0000)]
asan: optimization experiments
The experiments can be used to evaluate potential optimizations that remove
instrumentation (assess false negatives). Instead of completely removing
some instrumentation, you set Exp to a non-zero value (mask of optimization
experiments that want to remove instrumentation of this instruction).
If Exp is non-zero, this pass will emit special calls into runtime
(e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls
make runtime terminate the program in a special way (with a different
exit status). Then you run the new compiler on a buggy corpus, collect
the special terminations (ideally, you don't see them at all -- no false
negatives) and make the decision on the optimization.
The exact reaction to experiments in runtime is not implemented in this patch.
It will be defined and implemented in a subsequent patch.
http://reviews.llvm.org/D8198
llvm-svn: 232501
Ilia K [Tue, 17 Mar 2015 16:54:52 +0000 (16:54 +0000)]
Fix broadcasters for interpreter and process:
# Fix CommandInterpreter.Broadcaster name (it should be the same as CommandInterpreter::GetStaticBroadcasterClass())
# Prevent the same error in Process.Broadcaster
# Fix SBCommandInterpreter::GetBroadcasterClass (it should call CommandInterpreter::GetStaticBroadcasterClass(), was Communication::GetStaticBroadcasterClass())
llvm-svn: 232500
Timur Iskhodzhanov [Tue, 17 Mar 2015 16:50:59 +0000 (16:50 +0000)]
[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to BindIoCompletionCallback
This also simplifies how we handle QueueUserWorkItem
llvm-svn: 232499
Reid Kleckner [Tue, 17 Mar 2015 16:50:20 +0000 (16:50 +0000)]
Use an underlying enum type of unsigned to silence a -Wmicrosoft warning about being unable to put (unsigned)-1 into the default underyling type of int
llvm-svn: 232498
Shankar Easwaran [Tue, 17 Mar 2015 16:40:14 +0000 (16:40 +0000)]
[ELF][ARM] Place gotSymbol in an anonymous namespace
Address comments from Espindola.
llvm-svn: 232497
Hans Wennborg [Tue, 17 Mar 2015 16:38:58 +0000 (16:38 +0000)]
Revert r232454 and r232456: "Fix the LLVM type used when lowering initializer list reference temporaries to global variables."
This caused PR22940.
llvm-svn: 232496
Daniel Sanders [Tue, 17 Mar 2015 16:16:14 +0000 (16:16 +0000)]
[systemz] Distinguish the 'Q', 'R', 'S', and 'T' inline assembly memory constraints.
Summary:
But still handle them the same way since I don't know how they differ on
this target.
No functional change intended.
Reviewers: uweigand
Reviewed By: uweigand
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D8251
llvm-svn: 232495