summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* CallGraphTest.cpp: Remove invalid tests. ++S might step over F if S == F.NAKAMURA Takumi2014-11-181-3/+0
| | | | | | MSVC Runtime detects "Assertion failed: vector iterator not incrementable" llvm-svn: 222233
* [msan] Remove MSanDR and supporting code.Evgeniy Stepanov2014-11-1829-1480/+37
| | | | | | | | | | MSanDR is a dynamic instrumentation tool that can instrument the code (prebuilt libraries and such) that could not be instrumented at compile time. This code is unused (to the best of our knowledge) and unmaintained, and starting to bit-rot. llvm-svn: 222232
* [OPENMP] Additional processing of 'omp atomic read' directive.Alexey Bataev2014-11-188-26/+259
| | | | | | According to OpenMP standard, Section 2.12.6, atomic Construct, '#pragma omp atomic read' is allowed to be used only for expression statements of form 'v = x;', where x and v (as applicable) are both l-value expressions with scalar type. Patch adds checks for it. llvm-svn: 222231
* InstCombine: Fold away tautological masked comparesDavid Majnemer2014-11-182-1/+21
| | | | | | | | | It is impossible for (x & INT_MAX) == 0 && x == INT_MAX to ever be true. While this sort of reasoning should normally live in InstSimplify, the machinery that derives this result is not trivial to split out. llvm-svn: 222230
* InstCombine: Clean up foldLogOpOfMaskedICmpsDavid Majnemer2014-11-181-16/+14
| | | | | | No functional change intended. llvm-svn: 222229
* tsan: add description of AcquireGlobal functionDmitry Vyukov2014-11-181-0/+6
| | | | llvm-svn: 222228
* Add PIC-level support to Clang.Justin Hibbits2014-11-182-0/+19
| | | | | | | | | | | | | | | | | | Summary: This distinguishes between -fpic and -fPIC now, with the additions in LLVM for PIC level support. Test Plan: No regressions Reviewers: echristo, rafael Reviewed By: rafael Subscribers: rnk, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D5400 llvm-svn: 222227
* Fix up the code in the FuncUnwinders class thatJason Molenda2014-11-182-16/+16
| | | | | | | | | | retrieves the personality routine addr and the LSDA addr. Don't bother checking with the "non-call site" unwind plan - this kind of information is only going to come from the call site unwind plan. llvm-svn: 222226
* Add documentation for the SBTarget::ReadInstructions andJason Molenda2014-11-181-2/+27
| | | | | | | | | SBTarget::GetInstructions APIs so it's a little clearer to understand which should be used. <rdar://problem/18787018> llvm-svn: 222225
* [ASTReader] Add a convenience function to retrieve all the input files of a ↵Argyrios Kyrtzidis2014-11-182-0/+12
| | | | | | module file. llvm-svn: 222224
* docs: Modernize some examples in WritingAnLLVMPassJustin Bogner2014-11-181-3/+3
| | | | llvm-svn: 222223
* docs: Fix a couple of typo-ish errors in WritingAnLLVMPassJustin Bogner2014-11-181-4/+3
| | | | | | | | - Make CallGraphSCCPass's paragraph about doFinalization refer to runOnSCC instead of runOnFunction, since that's what it's about. - Fix a reference in the FunctionPass paragraph. llvm-svn: 222222
* Make the mutex ivar in Unwind recursive so we don't have a threadJason Molenda2014-11-181-1/+1
| | | | | | | | | deadlocking when we have the base Unwind class and the HistoryUnwind subclass both trying to acquire the lock on the same thread to clear their respective ivar state. <rdar://problem/18986350> llvm-svn: 222221
* Fully handle globals and functions in CGDebugInfo::getDeclarationOrDefinition()Frederic Riss2014-11-183-18/+122
| | | | | | | | | | | | | | | | | | | | Currently this function would return nothing for functions or globals that haven't seen a definition yet. Make it return a forward declaration that will get RAUWed with the definition if one is seen at a later point. The strategy used to implement this is similar to what's done for types: the forward declarations are stored in a vector and post processed upon finilization to perform the required RAUWs. For now the only user of getDeclarationOrDefinition() is EmitUsingDecl(), thus this patch allows to emit correct imported declarations even in the absence of an actual definition of the imported entity. (Another user will be the debug info generation for argument default values that I need to resurect). Differential Revision: http://reviews.llvm.org/D6173 llvm-svn: 222220
* [DebugInfo] Move collection of various function/var decl properties into ↵Frederic Riss2014-11-182-59/+94
| | | | | | | | helper functions. NFC. Helpers to be re-used in upcoming commit. llvm-svn: 222219
* Update to match LLVM r222216David Majnemer2014-11-182-2/+2
| | | | llvm-svn: 222218
* Allow DwarfCompileUnit::constructImportedEntityDIE to instanciate a ↵Frederic Riss2014-11-182-96/+211
| | | | | | | | | | | | | | | GlobalVariable DIE. Usually global variables are in a retain list and instanciated before any call to constructImportedEntityDIE is made. This isn't true for forward declarations though. The testcase for this change is generated by a clang patched to emit such forward declarations (patch at http://reviews.llvm.org/D6173 which will land soon). The updated testcase tests more than just global variables, it now tests every type of 'using' clause we support. llvm-svn: 222217
* llvm-readobj: Don't print the Characteristics field as the SubsystemDavid Majnemer2014-11-183-3/+3
| | | | | | | We claimed that we were printing the Subystem field when we were actually printing the Characteristics field. llvm-svn: 222216
* SimplifyCFG: Range'ify some for-loops. No functional change.Hans Wennborg2014-11-181-12/+13
| | | | llvm-svn: 222215
* Read the LSDA and Personality Routine function address out of theJason Molenda2014-11-186-5/+166
| | | | | | | | | | | | | | | | | | | | | eh_frame data. These two pieces of information are used in the process of exception handler unwinding on SysV ABI systems. This patch reads the data from the eh_frame section (DWARFCallFrameInfo.cpp), allows for it to be saved & read out of a given UnwindPlan (UnwindPlan.h, UnwindPlan.cpp) - as well as printing the information in the UnwindPlan::Dump method - and adds methods to the FuncUnwinders object so that higher levels can query if a given function has an LSDA / personality routine defined. It's only lightly tested, but seems to be working correctly as long as your have this information in eh_frame. Does not address getting this information from compact unwind yet on Darwin systems. <rdar://problem/18742797> llvm-svn: 222214
* IndVarSimplify: Allow LFTR to fire more oftenDavid Majnemer2014-11-182-2/+23
| | | | | | | | | | | | | I added a pessimization in r217102 to prevent miscompiles when the incremented induction variable was used in a comparison; it would be poison. Try to use the incremented induction variable more often when we can be sure that the increment won't end in poison. Differential Revision: http://reviews.llvm.org/D6222 llvm-svn: 222213
* IR: Sink MDNode::Hash down to GenericMDNode::HashDuncan P. N. Exon Smith2014-11-182-6/+4
| | | | | | Part of PR21532. llvm-svn: 222212
* IR: Move MDNode operands from the back to the frontDuncan P. N. Exon Smith2014-11-183-75/+67
| | | | | | | | | | | | | | | | | Having the operands at the back prevents subclasses from safely adding fields. Move them to the front. Instead of replicating the custom `malloc()`, `free()` and `DestroyFlag` logic that was there before, overload `new` and `delete`. I added calls to a new `GenericMDNode::dropAllReferences()` in `LLVMContextImpl::~LLVMContextImpl()`. There's a maze of callbacks happening during teardown, and this resolves them before we enter the destructors. Part of PR21532. llvm-svn: 222211
* Update testing case that was accidently duplicated.Manman Ren2014-11-181-77/+0
| | | | llvm-svn: 222210
* Fix covered switch warningMichael J. Spencer2014-11-181-0/+1
| | | | llvm-svn: 222209
* Support ELF files of unknown type.Michael J. Spencer2014-11-185-0/+7
| | | | llvm-svn: 222208
* Have CommandObjectCommandsAddRegex inherit from IOHandlerDelegateMultiline ↵Greg Clayton2014-11-181-58/+16
| | | | | | | | | | | | so it will not immediately terminate after the first regular expression in "command regex <name>" commands. Fixed the prompt to not include non-printable characters as it was hosing up the prompt when you ran "command regex foo" and entered multi-line editing mode. Fixed error strings to include more complete descriptions when bad regular expressions are entered. Removed the old IOHandlerLinesUpdated function as it is no longer needed (inheriting from IOHandlerDelegateMultiline takes care of what this function used to do). llvm-svn: 222207
* Fixed a broken test suite test after recent editline merges.Greg Clayton2014-11-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that editline currently is trying to be smart when we paste things into a terminal window. It detects that input is pending and multi-line input is accepted as long as there is anything pending. So if you open lldb and paste the text between the quotes: "command regex carp s/^$/help/ carp " We still still be stuck in the "command regex" multi-line input reader as it will have all three lines: "s/^$/help/ carp " The true fix for this is something Kate Stone will soon work on: - multi-line input readers must opt into this paste/pending input feature ("expr" will opt into it, all other commands won't) - If we are in a multi-line input reader that requests this and stuff is pasted, then it will do what it does today - if we start in a IOHandler that doesn't need/want pending input and text is pasted, and we transistion to a IOHandler that does want this functionality, then disable the pending input. Example text would be: "frame variable thread backtrace expr for (int i=0;i<10;++i) (int)printf("i = %i\n", i); frame select 0 " When we push the expression multi-line reader we would disable the pending input because we had pending input _before_ we entered "expr". If we did this first: (lldb) expr Then we pasted: "void foo() { } void bar() { } " Then we would allow the pending input to not look for an empty line to terminate the expression. We filed radar 19008425 to track fixing this issue. llvm-svn: 222206
* IR: Split MDNode into GenericMDNode and MDNodeFwdDeclDuncan P. N. Exon Smith2014-11-185-56/+128
| | | | | | | | | | | | | | | | | | | Split `MDNode` into two classes: - `GenericMDNode`, which is uniquable (and for now, always starts uniqued). Once `Metadata` is split from the `Value` hierarchy, this class will lose the ability to RAUW itself. - `MDNodeFwdDecl`, which is used for the "temporary" interface, is never uniqued, and isn't managed by `LLVMContext` at all. I've left most of the guts in `MDNode` for now, but I'll incrementally move things to the right places (or delete the functionality, as appropriate). Part of PR21532. llvm-svn: 222205
* InstrProf: Don't emit coverage for uninstantiated templatesJustin Bogner2014-11-182-7/+29
| | | | | | | | | | | | | We include unused functions and methods in -fcoverage-mapping so that we can differentiate between uninstrumented and unused. This can cause problems for uninstantiated templates though, since they may involve an incomplete type that can't be mangled. This shows up in things like libc++'s <unordered_map> and makes coverage unusable. Avoid the issue by skipping uninstantiated methods of a templated class. llvm-svn: 222204
* Revert r222040 because of bot failure.Manman Ren2014-11-182-19/+6
| | | | | | | http://lab.llvm.org:8080/green/job/clang-Rlto_master/298/ Hopefully, bot will be green. llvm-svn: 222203
* [mach-o] zero-fill sections have no file offsetNick Kledzik2014-11-183-13/+24
| | | | | | | In mach-o, sections of type S_ZEROFILL are special cased and to always have their section.offset field be zero. llvm-svn: 222202
* [mach-o] extract atom alignment information from mach-o filesNick Kledzik2014-11-184-11/+66
| | | | llvm-svn: 222201
* [mach-o] enhance arm64 reloc parser to support local pointer relocationsNick Kledzik2014-11-181-1/+5
| | | | | | | | | | | The arm64 assembler almost always uses r_extern=1 relocations in which the r_symbolnum field is the index of the symbol the relocation references. But sometimes it will set r_extern=0 in which case the linker needs to read the content of the reloction to determine the target. Add test case that the r_extern=0 relocation round trips. llvm-svn: 222200
* [mach-o] fix typos. No function changeNick Kledzik2014-11-181-5/+1
| | | | llvm-svn: 222199
* [mach-o] enhance arm64 reloc parser to support local pointer relocationsNick Kledzik2014-11-182-60/+105
| | | | | | | | | | | The arm64 assembler almost always uses r_extern=1 relocations in which the r_symbolnum field is the index of the symbol the relocation references. But sometimes it will set r_extern=0 in which case the linker needs to read the content of the reloction to determine the target. Add test case that the r_extern=0 relocation round trips. llvm-svn: 222198
* [mach-o] fix typos. No function changeNick Kledzik2014-11-181-4/+3
| | | | llvm-svn: 222197
* Debug Info: context field of a global variable is DIScopeRef.Manman Ren2014-11-181-1/+1
| | | | | | Paired commit with r222195. llvm-svn: 222196
* Debug Info: In DIBuilder, the context field of a global variable is updated toManman Ren2014-11-185-7/+161
| | | | | | | | | | | use DIScopeRef. A paired commit at clang will follow to show cases where we will use an identifer for the context of a global variable. rdar://18958417 llvm-svn: 222195
* Fix an assertion when ending a function definition.John McCall2014-11-182-1/+47
| | | | | | | | | | | | | | | | | | | | The bug is that ExprCleanupObjects isn't always empty in a fresh evaluation context. New evaluation contexts just track the current depth of the stack. The assertion will misfire whenever we finish processing a function body inside an expression that contained an earlier block literal with non-trivial captures. That's actually a lot less likely than you'd think, though, because it has to be a real function declaration, not just another block. Mixed block/lambda code would work, as would a template instantiation or a local class definition. The code works correctly if the assertion is disabled. rdar://16356628 llvm-svn: 222194
* Make DiagnosticsEngine::takeClient return std::unique_ptr<>Alexander Kornienko2014-11-1710-58/+34
| | | | | | | | | | | | | | | | | | Summary: Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated callers to store conditional ownership using a pair of pointer and unique_ptr instead of a pointer + bool. Updated code that temporarily registers clients to use the non-owning registration (+ removed extra calls to takeClient). Reviewers: dblaikie Reviewed By: dblaikie Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6294 llvm-svn: 222193
* Handle use of default member initializers before end of outermost classReid Kleckner2014-11-1715-89/+301
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, when we have this situation: struct A { template <typename T> struct B { int m1 = sizeof(A); }; B<int> m2; }; We can't parse m1's initializer eagerly because we need A to be complete. Therefore we wait until the end of A's class scope to parse it. However, we can trigger instantiation of B before the end of A, which will attempt to instantiate the field decls eagerly, and it would build a bad field decl instantiation that said it had an initializer but actually lacked one. Fixed by deferring instantiation of default member initializers until they are needed during constructor analysis. This addresses a long standing FIXME in the code. Fixes PR19195. Reviewed By: rsmith Differential Revision: http://reviews.llvm.org/D5690 llvm-svn: 222192
* IR: Simplify uniquing for MDNodeDuncan P. N. Exon Smith2014-11-176-77/+97
| | | | | | | | | | | | | | | | | | Change uniquing from a `FoldingSet` to a `DenseSet` with custom `DenseMapInfo`. Unfortunately, this doesn't save any memory, since `DenseSet<T>` is a simple wrapper for `DenseMap<T, char>`, but I'll come back to fix that later. I used the name `GenericDenseMapInfo` to the custom `DenseMapInfo` since I'll be splitting `MDNode` into two classes soon: `MDNodeFwdDecl` for temporaries, and `GenericMDNode` for everything else. I also added a non-debug-info reduced version of a type-uniquing test that started failing on an earlier draft of this patch. Part of PR21532. llvm-svn: 222191
* Fix a problem where the StringPrinter could be mistaking an empty string for ↵Enrico Granata2014-11-173-1/+5
| | | | | | a read error, and reporting spurious 'unable to read data' messages. rdar://19007243 llvm-svn: 222190
* Add APIs on SBFunction and SBCompileUnit to inquire about the language type ↵Enrico Granata2014-11-176-0/+30
| | | | | | that the function/compile unit is defined in llvm-svn: 222189
* Revert "ADT: correctly report isMSVCEnvironment for windows itanium"Reid Kleckner2014-11-173-3/+2
| | | | | | This reverts commit r222180. llvm-svn: 222188
* Revert "Improve memory ownership/management in TableGen by unique_ptrifying ↵David Blaikie2014-11-172-55/+47
| | | | | | | | | | | | TreePattern's Tree member." This reverts commit r222183. Broke on the MSVC buildbots due to MSVC not producing default move operations - I'd fix it immediately but just broke my build system a bit, so backing out until I have a chance to get everything going again. llvm-svn: 222187
* Fix override/virtual warnings.Eric Christopher2014-11-171-22/+23
| | | | llvm-svn: 222186
* Change HostThread::GetNativeThread() to return a derived reference.Zachary Turner2014-11-178-32/+46
| | | | | | | | Previously using HostThread::GetNativeThread() required an ugly cast to most-derived type. This solves the issue by simply returning the derived type directly. llvm-svn: 222185
* Fix broken NativeProcessLinux.cpp after signature change of ResolveExecutable.Oleksiy Vyalov2014-11-171-1/+1
| | | | llvm-svn: 222184
OpenPOWER on IntegriCloud