Commit Graph

160207 Commits

Author SHA1 Message Date
Chad Rosier 3c03dee1d1 [AArch64] Add support for NEON scalar extract narrow instructions.
llvm-svn: 192971
2013-10-18 14:03:36 +00:00
Chad Rosier fe2f58c8a1 [AArch64] Add support for NEON scalar extract narrow instructions.
llvm-svn: 192970
2013-10-18 14:03:24 +00:00
Simon Atanasyan 2c97a81e81 [Mips] Define __mips_fpr and _MIPS_FPSET macros.
llvm-svn: 192969
2013-10-18 13:13:53 +00:00
Ed Maste 243fbbdcfd Correct log message typo: ended ad -> ended at
(From LLDB r192897)

llvm-svn: 192968
2013-10-18 13:01:33 +00:00
Evgeniy Stepanov 78c5730bec [sanitizer] Fix OSX build some more.
llvm-svn: 192967
2013-10-18 12:19:23 +00:00
Evgeniy Stepanov b4e501c6ec [sanitizer] Fix OSX build.
llvm-svn: 192966
2013-10-18 11:26:02 +00:00
Evgeniy Stepanov 3cb9df042e [sanitizer] Move statfs/fstatfs to common interceptors and add statvfs/fstatvfs.
llvm-svn: 192965
2013-10-18 11:14:16 +00:00
Daniel Jasper 6633ab8ad9 clang-format: Make continuation indent width configurable.
Patch by Kim Gräsman. Thank you!

llvm-svn: 192964
2013-10-18 10:38:14 +00:00
Silviu Baranga 314e58fdcc Add hardware division as a default feature on Cortex-A15. Also add test cases to check this, and change diagnostics for the hwdiv-arm feature to something useful.
llvm-svn: 192963
2013-10-18 10:18:40 +00:00
Hafiz Abid Qadeer 85a4daf4f6 Adjust PC after hitting breakpoint on remote target.
This commit adds an example python file that can be used with 'target-definition-file' setting for Linux gdbserver.
This file has an extra key 'breakpoint-pc-offset' that LLDB uses to determine how much to change the PC
after hitting the breakpoint.

llvm-svn: 192962
2013-10-18 10:04:33 +00:00
Daniel Sanders eb4003651d [mips][msa] Added a regression test that depended on multiple patches to pass.
llvm-svn: 192961
2013-10-18 09:52:21 +00:00
Kostya Serebryany e2007b706e [asan] fix a test on Mac
llvm-svn: 192960
2013-10-18 09:42:24 +00:00
Evgeniy Stepanov 70d5abfba2 [sanitizer] Intercept getmntent, getmntent_r.
llvm-svn: 192959
2013-10-18 09:41:43 +00:00
Alp Toker 4655259769 Developer policy amendment regarding confidentiality notices
Thanks to Daniel Berlin and Nadav Rotem for feedback and rewording!

Discussion:
  http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131014/191677.html

Reviewed by: nrotem, dberlin

llvm-svn: 192958
2013-10-18 08:45:43 +00:00
David Majnemer 451b7dd1ef CodeGen: Emit a libcall if the target doesn't support 16-byte wide atomics
There are targets that support i128 sized scalars but cannot emit
instructions that modify them directly.  The proper thing to do is to
emit a libcall.

This fixes PR17481.

llvm-svn: 192957
2013-10-18 08:03:43 +00:00
Kostya Serebryany 4bf67d99f4 [asan] fix atexit stats
llvm-svn: 192956
2013-10-18 07:57:59 +00:00
Alp Toker 42235db0e9 Fix a conversion warning in the mingw32 build
gcc diagnoses this:
  warning: converting to non-pointer type 'unsigned int' from NULL

Also remove an empty statement.

No change in functionality.

llvm-svn: 192955
2013-10-18 07:53:25 +00:00
Alexey Samsonov 742e6b8efd [DebugInfo] Remove unneeded struct member and hide struct definition. No functionality change.
llvm-svn: 192954
2013-10-18 07:13:32 +00:00
Alp Toker 153675b718 Fix initialization order warning in mingw32 build
No change in functionality.

llvm-svn: 192953
2013-10-18 07:09:58 +00:00
Alexey Samsonov 5b5a7865e7 [DebugInfo] Remove dead code.
llvm-svn: 192952
2013-10-18 07:03:16 +00:00
Richard Smith 3d8e97eda2 C++ modules: don't lose track of a 'namespace std' that is imported from a module.
llvm-svn: 192951
2013-10-18 06:54:39 +00:00
Richard Smith 2b9e3e396a Basic ODR checking for C++ modules:
If we have multiple definitions of the same entity from different modules, we
nominate the first definition which we see as being the canonical definition.
If we load a declaration from a different definition and we can't find a
corresponding declaration in the canonical definition, issue a diagnostic.

This is insufficient to prevent things from going horribly wrong in all cases
-- we might be in the middle of emitting IR for a function when we trigger some
deserialization and discover that it refers to an incoherent piece of the AST,
by which point it's probably too late to bail out -- but we'll at least produce
a diagnostic.

llvm-svn: 192950
2013-10-18 06:05:18 +00:00
Jason Molenda 3dc4f44e71 Move the code which translates a dispatch_qaddr into a
queue name out of ProcessGDBRemote and in to the Platform
plugin, specifically PlatformDarwin.

Also add a Platform method to translate a dispatch_quaddr
to a QueueID, and a Thread::GetQueueID().

I'll add an SBThread::GetQueueID() next.

llvm-svn: 192949
2013-10-18 05:55:24 +00:00
Alp Toker 19bff32e09 Check "late parsed" friend functions for redefinition
r177003 applied the late parsed template technique to friend functions
but omitted the corresponding check for redefinitions.

This patch adds the same check already in use for templates to the
new code path in order to diagnose and reject invalid redefinitions
that were being silently accepted.

Fixes PR17324.

Reviewed by Richard Smith.

llvm-svn: 192948
2013-10-18 05:54:24 +00:00
Alp Toker ae3a944a6e Fix missed exception spec checks and crashes
Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
swap and process the worklists.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

Checking can be further delayed where parent classes aren't yet fully defined.
This patch adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

llvm-svn: 192947
2013-10-18 05:54:19 +00:00
Nick Lewycky b01092f0e3 False. GCC does not accept [[gnu::warn_unused]], not to be confused with [[gnu::warn_unused_result]] which does exist.
llvm-svn: 192946
2013-10-18 05:00:41 +00:00
Rui Ueyama f47fa51c69 Fill the atom gap with INT 3 instead of NOP.
INT 3 (machine code 0xCC) will raise an interrupt when executed. That is better
for filling the gap than NOP because we want to stop the execution immediately
when the control reached to non-code address.

llvm-svn: 192945
2013-10-18 03:23:33 +00:00
Shankar Easwaran 0879c1e601 [Native] Fix fallback atoms when writing to Native file.
There is no test as currently there is no call to the NativeWriter.

Future commits will add calls to the NativeWriter.

llvm-svn: 192944
2013-10-18 03:23:24 +00:00
Rui Ueyama 5206222faf Fix -Wunused-function warning of release build.
llvm-svn: 192943
2013-10-18 03:18:54 +00:00
Rui Ueyama 4050b20b04 Fix a layout pass debug message.
llvm-svn: 192942
2013-10-18 03:18:52 +00:00
Rui Ueyama 6a607b6a3b Improve debug message of the layout pass.
Instead of showing multiple lines of debug messages, show only one message
by CompareAtoms::operator(). Here is an example.

Before:
  Sorting _main .text
  Sorting by sectionPos(2,2)
  Sorting by override
  Sorting _main .text
  Sorting by sectionPos(2,2)
  Sorting by override

After:
  Layout: '_main' > '.text' (override (1, 0))
  Layout: '_main' > '.text' (override (1, 0))

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

llvm-svn: 192941
2013-10-18 02:56:31 +00:00
Hans Wennborg 7ddcdc82a5 Revert "Re-commit r192758 - MC: quote tricky symbol names in asm output"
This caused the clang-native-mingw32-win7 buildbot to break.

The assembler was complaining about the following lines that were showing up
in the asm for CrashRecoveryContext.cpp:

  movl  $"__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4", 4(%eax)
  calll "_AddVectoredExceptionHandler@8"
  .def   "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4";
  "__ZL16ExceptionHandlerP19_EXCEPTION_POINTERS@4":
  calll "_RemoveVectoredExceptionHandler@4"

Reverting for now.

llvm-svn: 192940
2013-10-18 02:14:40 +00:00
Shankar Easwaran b6c825a5cf [ELF] Set ordinals properly to all atoms.
llvm-svn: 192939
2013-10-18 02:12:17 +00:00
Eric Christopher ffbc4decc2 Temporarily revert r192749 as it is causing problems for LTO and
requires a more in depth change to the IR structure.

llvm-svn: 192938
2013-10-18 01:57:30 +00:00
Richard Smith 77c5bb5e4a Fix 80-column violation.
llvm-svn: 192937
2013-10-18 01:34:56 +00:00
David Majnemer a543308ce5 [-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for 'final'
Summary: Some MS headers use these features.

Reviewers: rnk, rsmith

CC: cfe-commits

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

llvm-svn: 192936
2013-10-18 00:33:31 +00:00
DeLesley Hutchins 6939177cea Consumed analysis: Add param_typestate attribute, which specifies that
function parameters must be in a particular state.  Patch by
chris.wailes@gmail.com.  Reviewed by delesley@google.com.

llvm-svn: 192934
2013-10-17 23:23:53 +00:00
Fariborz Jahanian 403425bba8 ObjectiveC migrator. Minor clean up of my last patch.
No functional change.

llvm-svn: 192933
2013-10-17 23:13:13 +00:00
DeLesley Hutchins 36ea1dd4fc Consumed Analysis: Allow parameters that are passed by non-const reference
to be treated as return values, and marked with the "returned_typestate"
attribute.  Patch by chris.wailes@gmail.com; reviewed by delesley@google.com.

llvm-svn: 192932
2013-10-17 22:53:04 +00:00
Richard Smith c1d5471291 Make the big array in the UBSan C++ runtime be zero-initialized to dramatically
shrink the binary size of the ubsan runtime.

Also fix a bug where long-running processes could eventually trigger a crash in
the runtime by filling up the cache. I've not found a nice way to add a test for
this crasher; ideas welcome.

llvm-svn: 192931
2013-10-17 22:51:04 +00:00
Rui Ueyama cf671439be Fill gap in .text with NOP.
llvm-svn: 192930
2013-10-17 22:45:16 +00:00
Richard Mitton 665068b379 Removed unnecessary call to OpenFirstAvailableMaster.
::Fork already does this internally, so this was simply leaking file handles.

This fixes the problem where the test suite would occasionally run out of file handles.

llvm-svn: 192929
2013-10-17 22:36:28 +00:00
Enrico Granata 52b4b6cddc This is the last piece of work for "formats in categories": we now cache formats as well as summaries and synthetics
llvm-svn: 192928
2013-10-17 22:27:19 +00:00
Fariborz Jahanian de79e81686 ObjectiveC migrator. In infering NS_ENUM/NS_OPTIONS
macros, prefer the typedef immediately following the
enum declaration to the one preceeding it.
// rdar://15200915

llvm-svn: 192927
2013-10-17 22:23:32 +00:00
DeLesley Hutchins db67ec3c27 Consumed analysis: update to previous test case.
llvm-svn: 192926
2013-10-17 22:21:03 +00:00
David Blaikie 01fae51fef DIEHash: Add more things (and remove one character) from the COLLECT_ATTR macro
Makes the uses more terse and requires that they use a semicolon at the
end that helps editors indent proceeding lines correctly.

llvm-svn: 192925
2013-10-17 22:14:08 +00:00
David Blaikie ca353be652 DIEHash: Support for simple (non-recursive, non-reused) type references
llvm-svn: 192924
2013-10-17 22:07:09 +00:00
Reid Kleckner 5a823d5f05 [ms-cxxabi] Error out on virtual function memptrs
These are uncommon and this is better than miscompiling.

llvm-svn: 192923
2013-10-17 21:30:27 +00:00
Richard Mitton 0a55835755 Added support for reading thread-local storage variables, as defined using the __thread modifier.
To make this work this patch extends LLDB to:

- Explicitly track the link_map address for each module. This is effectively the module handle, not sure why it wasn't already being stored off anywhere. As an extension later, it would be nice if someone were to add support for printing this as part of the modules list.

- Allow reading the per-thread data pointer via ptrace. I have added support for Linux here. I'll be happy to add support for FreeBSD once this is reviewed. OS X does not appear to have __thread variables, so maybe we don't need it there. Windows support should eventually be workable along the same lines.

- Make DWARF expressions track which module they originated from.

- Add support for the DW_OP_GNU_push_tls_address DWARF opcode, as generated by gcc and recent versions of clang. Earlier versions of clang (such as 3.2, which is default on Ubuntu right now) do not generate TLS debug info correctly so can not be supported here.

- Understand the format of the pthread DTV block. This is where it gets tricky. We have three basic options here:

  1) Call "dlinfo" or "__tls_get_addr" on the inferior and ask it directly. However this won't work on core dumps, and generally speaking it's not a good idea for the debugger to call functions itself, as it has the potential to not work depending on the state of the target.

  2) Use libthread_db. This is what GDB does. However this option requires having a version of libthread_db on the host cross-compiled for each potential target. This places a large burden on the user, and would make it very hard to cross-debug from Windows to Linux, for example. Trying to build a library intended exclusively for one OS on a different one is not pleasant. GDB sidesteps the problem and asks the user to figure it out.

  3) Parse the DTV structure ourselves. On initial inspection this seems to be a bad option, as the DTV structure (the format used by the runtime to manage TLS data) is not in fact a kernel data structure, it is implemented entirely in useerland in libc. Therefore the layout of it's fields are version and OS dependent, and are not standardized.

  However, it turns out not to be such a problem. All OSes use basically the same algorithm (a per-module lookup table) as detailed in Ulrich Drepper's TLS ELF ABI document, so we can easily write code to decode it ourselves. The only question therefore is the exact field layouts required. Happily, the implementors of libpthread expose the structure of the DTV via metadata exported as symbols from the .so itself, designed exactly for this kind of thing. So this patch simply reads that metadata in, and re-implements libthread_db's algorithm itself. We thereby get cross-platform TLS lookup without either requiring third-party libraries, while still being independent of the version of libpthread being used.

Test case included.

llvm-svn: 192922
2013-10-17 21:14:00 +00:00
Alp Toker be2a55f5ac Revert "Fix missed exception spec checks and crashes"
The changes caused the sanitizer bot to hang:
  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311

Needs investigation.

This reverts commit r192914.

llvm-svn: 192921
2013-10-17 21:00:19 +00:00