Commit Graph

204892 Commits

Author SHA1 Message Date
Richard Smith 696e812bb3 [modules] Fix crash when writing an update record for a redeclaration of an empty namespace.
llvm-svn: 241732
2015-07-08 21:15:32 +00:00
Diego Novillo 13e20f1bbf Add missing dependency to Hexagon target.
A recent patch added calls to isInstructionTriviallyDead without the
corresponding dependency on TransformUtils.

llvm-svn: 241731
2015-07-08 21:13:37 +00:00
Simon Pilgrim d865503b59 [X86][SSE] Vector shift test cleanup. NFC.
llvm-svn: 241730
2015-07-08 21:11:17 +00:00
Peter Collingbourne 3d4114b609 CodeGen: Fix off-by-one error in CFI class identification function for MS ABI.
We were previously ignoring classes laid out at offset zero.

llvm-svn: 241729
2015-07-08 21:08:08 +00:00
Peter Collingbourne 4bdceaa4de Driver: enable support for -fsanitize=cfi on Windows.
There are known issues, but the current implementation is good enough for
the check-cfi test suite.

Differential Revision: http://reviews.llvm.org/D11030

llvm-svn: 241728
2015-07-08 21:08:05 +00:00
Rafael Espindola 80c662d243 Use a raw_svector_ostream and simplify a loop. NFC.
llvm-svn: 241727
2015-07-08 21:07:18 +00:00
John Thompson 91656d2db6 Fixed erroneous comments.
llvm-svn: 241726
2015-07-08 21:05:57 +00:00
Reid Kleckner 4f21df2b96 [Win64] Only treat some functions as having the Win64 convention
All the usual X86 target-specific conventions are collapsed to the
normal Win64 convention, but the custom conventions like GHC and webkit
should not be.

Previously we would assume that the caller allocated 32 bytes of shadow
space for us, which is not how webkit_jscc or other custom conventions
are supposed to work.

Based on a patch by peavo@outlook.com.

Fixes PR24051.

llvm-svn: 241725
2015-07-08 21:03:47 +00:00
John Thompson ddd7dea4b1 Fixed erroneous comment.
llvm-svn: 241724
2015-07-08 20:57:32 +00:00
Adrian Prantl 8f0bd5a5dd Cleanup the doxygen comments in CGDebugInfo.h according to the coding
standards and clang-format the file.

llvm-svn: 241723
2015-07-08 20:53:55 +00:00
Adrian Prantl e8b1cda091 Fix the spelling of Objective-C.
llvm-svn: 241722
2015-07-08 20:53:53 +00:00
Rafael Espindola a2ed0b0bab Start adding support for writing archives in BSD format.
No support for the symbol table yet (but will hopefully add it today).
We always use the long filename format so that we can align the member,
which is an advantage of the BSD format.

llvm-svn: 241721
2015-07-08 20:47:32 +00:00
Rui Ueyama dcb46d6a74 COFF: Remove dead code.
r241647 made Driver to infer machine type, so this code is not actually in use.

llvm-svn: 241720
2015-07-08 20:35:29 +00:00
Rui Ueyama 1c79ce9a4c COFF: Implement dllimported symbol name mangling.
Symbols exported by DLLs are listed in import library files.
Exported names may be mangled by "Import Name Type" field as
described in PE/COFF spec 7.3. This patch implements that
mangling scheme.

llvm-svn: 241719
2015-07-08 20:22:50 +00:00
Alex Lorenz b1f9ce8fc9 MIR Parser: Use source locations for MBB naming errors.
This commit changes the type of the field 'Name' in the struct
'yaml::MachineBasicBlock' from 'std::string' to 'yaml::StringValue'. This change
allows the MIR parser to report errors related to the MBB name with the proper
source locations.

llvm-svn: 241718
2015-07-08 20:22:20 +00:00
Sanjay Patel c1afa95a51 early exits -> less indenting; NFCI
llvm-svn: 241716
2015-07-08 19:32:39 +00:00
Krzysztof Parzyszek 79b2433e7c [Hexagon] Implement commoning of GetElementPtr instructions
llvm-svn: 241714
2015-07-08 19:22:28 +00:00
Peter Collingbourne 04a4711565 COFF: Set parent name for bitcode files.
Differential Revision: http://reviews.llvm.org/D10983

llvm-svn: 241713
2015-07-08 19:14:33 +00:00
Stephane Sezer 9a7cacb5f6 Implement qXfer:libraries:read.
Summary:
This is used on non-unix platforms, where qXfer:libraries-svr4:read
doesn't make sense. Windows uses that for instance.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D11036

llvm-svn: 241712
2015-07-08 19:14:03 +00:00
Benjamin Kramer f448c783af Remove unused diagnostics. NFC.
llvm-svn: 241711
2015-07-08 19:10:43 +00:00
Peter Collingbourne 7a544f7327 LibDriver: Fix output path inference.
The inferred output file name is based on the first input file, not the
first one with extension .obj. The output file was also being written to
the wrong directory; it needs to be written to whichever directory on the
libpath it was found in. This change fixes both issues.

llvm-svn: 241710
2015-07-08 19:00:46 +00:00
Davide Italiano 3d5b610c86 [Driver] print-multi-os-directory is unsupported.
Until somebody writes the code for it, be loud about the fact that
it's not implemented yet.

Differential Revision:	http://reviews.llvm.org/D11020

llvm-svn: 241708
2015-07-08 18:49:41 +00:00
Adam Nemet 0131a5693a [LAA] Add missing debug output after r239285
r239285 ([LoopAccessAnalysis] Teach LAA to check the memory dependence
between strided accesses.) introduced a new case under
MemoryDepChecker::isDependent.  We normally have debug output for each
case.

llvm-svn: 241707
2015-07-08 18:47:38 +00:00
Gabor Horvath c3177f2ed4 [Static Analyzer] Make the paths relative from the project root when generating reference results in the test suite.
llvm-svn: 241706
2015-07-08 18:39:31 +00:00
Justin Bogner 25bf8cb3c0 AST: Avoid reading an unitialized value
Desugar doesn't necessarily initialize ShouldAKA, but as of r241542 it
may read it. Fix the misuse of the API and initialize this before
passing it in.

Found by ubsan.

llvm-svn: 241705
2015-07-08 18:32:26 +00:00
Reid Kleckner 338635389f [SEH] Re-enable SEH on x86 Windows after r241699
llvm-svn: 241704
2015-07-08 18:27:10 +00:00
Rui Ueyama f82b4fa9c7 Object/COFF: Fix import library's getNameType method.
This expression to extract bits were simply wrong.
I'm going to test this functionality from LLD.

llvm-svn: 241703
2015-07-08 18:21:09 +00:00
Oleksiy Vyalov c8a3e9273c Try to enable TestProcessAttach tests on Linux.
http://reviews.llvm.org/D11013

llvm-svn: 241702
2015-07-08 18:15:32 +00:00
Rui Ueyama e16a75d5a1 COFF: Handle /machine option in a similar manner for other options. NFC.
llvm-svn: 241701
2015-07-08 18:14:51 +00:00
Reid Kleckner 0a3f5f634a [SEH] Add missing test case from previous realignment commit
llvm-svn: 241700
2015-07-08 18:09:39 +00:00
Reid Kleckner ed012dbf2a [SEH] Ensure that empty __except blocks have their own BB
The 32-bit lowering assumed that WinEHPrepare had this invariant.
WinEHPrepare did it for C++, but not SEH. The result was that we would
insert calls to llvm.x86.seh.restoreframe in normal basic blocks, which
corrupted the frame pointer.

llvm-svn: 241699
2015-07-08 18:08:52 +00:00
James Y Knight bc832ed51d Expand LangRef.html's documentation on LLVM's inline assembly.
While trying to figure out how this was all supposed to work, I
figured I'd start writing down some documentation, since it was
basically completely missing.

Differential Revision: http://reviews.llvm.org/D10816

llvm-svn: 241698
2015-07-08 18:08:36 +00:00
Stephane Sezer 38a1b7ea58 Move WindowsDYLD to the Plugins/DynamicLoader directory.
Summary:
This commit moves the Windows DyanamicLoader to the common DynamicLoader
directory. This is required to remote debug Windows targets.

This commit also initializes the Windows DYLD plugin in
SystemInitializerCommon (similarly to both POSIX and MacOSX DYLD
plugins) so that we can automatically instantiate this class when
connected to a windows process.

Test Plan: Build.

Reviewers: zturner

Subscribers: lldb-commits, abdulras

Differential Revision: http://reviews.llvm.org/D10882

llvm-svn: 241697
2015-07-08 18:07:13 +00:00
Peter Collingbourne e008391ea2 Create lld-link2 symlink/copy for new COFF linker.
This situation will only be temporary; I imagine we will eventually want to
have the new linker take the lld-link alias after we remove the old one.
However, I would like to port the CFI test suite in the compiler-rt
repository to Windows using the new COFF linker's LTO support; these tests
currently use gcc-style command lines and invoke the linker via the
compiler driver.

We can select the linker using the -fuse-ld flag, which Clang supports on
Windows, but it takes an executable name, rather than a list of arguments
(so "-fuse-ld=lld -flavor link2" wouldn't work), and it doesn't seem worth
the effort to extend the Clang driver to support arguments.

Differential Revision: http://reviews.llvm.org/D11031

llvm-svn: 241696
2015-07-08 18:05:22 +00:00
Sean Callanan 83b8ad0eaa Fixed a serious bug in DeportType where the types could retain DeclContexts that
pointed into the artificial function constructed for the expression.  I now make
anything that pointed to the function as its DeclContext be global while the
copy occurs; afterward I restored the old DeclContext.

Added a testcase that make sure that this works properly and doesn't crash
anything.

<rdar://problem/21049838>

llvm-svn: 241695
2015-07-08 18:03:41 +00:00
Duncan P. N. Exon Smith e086afa667 MC: Make MCSubtargetInfo::isCPUStringValid() const, NFC
This method doesn't modify any members, so it should be const.

llvm-svn: 241694
2015-07-08 17:41:53 +00:00
Duncan P. N. Exon Smith ad98745561 MC: Constify MCSubtargetInfo in getDeprecationInfo(), NFC
There's no reason to be able to mutate `MCSubtargetInfo` in
`getDeprecationInfo()`.  Constify the reference.

llvm-svn: 241693
2015-07-08 17:30:55 +00:00
Rafael Espindola 65a9953d69 Inline function into only use.
llvm-svn: 241692
2015-07-08 17:26:24 +00:00
Rafael Espindola c291a4b212 Add a helper function to reduce a bit of code duplication.
llvm-svn: 241691
2015-07-08 17:08:26 +00:00
Adrian Prantl 26686c4af0 Update PCHInternals.rst to document PCH wrapped in object file containers.
llvm-svn: 241690
2015-07-08 16:52:51 +00:00
David Majnemer 2c345a337c COFF: Emit a symbol table if /debug is specified
Providing a symbol table in the executable is quite useful when
debugging a fully-linked executable without having to reconstruct one
from DWARF.

Differential Revision: http://reviews.llvm.org/D11023

llvm-svn: 241689
2015-07-08 16:37:50 +00:00
Sean Callanan c307c27035 Revert r241672, which breaks the OS X build by introducing a dependency on
platform-specific symbols that are not implemented on OS X.

The build error that caused this is

Undefined symbols for architecture x86_64:
  "lldb_private::NativeProcessProtocol::Attach(unsigned long long, lldb_private::NativeProcessProtocol::NativeDelegate&, std::__1::shared_ptr<lldb_private::NativeProcessProtocol>&)", referenced from:
      lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::AttachToProcess(unsigned long long) in liblldb-core.a(GDBRemoteCommunicationServerLLGS.o)
  "lldb_private::NativeProcessProtocol::Launch(lldb_private::ProcessLaunchInfo&, lldb_private::NativeProcessProtocol::NativeDelegate&, std::__1::shared_ptr<lldb_private::NativeProcessProtocol>&)", referenced from:
      lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::LaunchProcess() in liblldb-core.a(GDBRemoteCommunicationServerLLGS.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

llvm-svn: 241688
2015-07-08 16:33:46 +00:00
Eli Bendersky 8e131f8cbc Cosmetic cleanups - NFC
Remove commented lines, trailing whitespace, etc.

llvm-svn: 241687
2015-07-08 16:33:21 +00:00
James Y Knight f238d176eb [SPARC] Cleanup handling of the Y/ASR registers.
- Implement copying ASR to/from GPR regs.
- Mark ASRs as non-allocatable, so it won't try to arbitrarily use
  them inappropriately.
- Instead of inserting explicit WRASR/RDASR nodes in the MUL/DIV
  routines, just do normal register copies.
- Also...mark div as using Y, not just writing it.

Added a test case with some code which previously died with an
assertion failure (with -O0), or produced wrong code (otherwise).

(Third time's the charm?)

Differential Revision: http://reviews.llvm.org/D10401

llvm-svn: 241686
2015-07-08 16:25:12 +00:00
Rafael Espindola 51271bdc4f Use a range loop. NFC.
llvm-svn: 241685
2015-07-08 16:16:15 +00:00
Adrian Prantl dfb9618687 Revert "Fix a linker issue with clang-check on Linux."
This reverts commit r241636 as it turned out to be unnecessary.

llvm-svn: 241684
2015-07-08 15:57:42 +00:00
Krzysztof Parzyszek 21b53a5120 [Hexagon] Generate "insert" instructions more aggressively
llvm-svn: 241683
2015-07-08 14:47:34 +00:00
Krzysztof Parzyszek d19b4767ff Revert 241681: causes Windows builds to fail
llvm-svn: 241682
2015-07-08 14:34:13 +00:00
Krzysztof Parzyszek 712b15b45e [Hexagon] Generate "insert" instructions more aggressively
llvm-svn: 241681
2015-07-08 14:22:27 +00:00
NAKAMURA Takumi e1dc95c6c1 [CMake] clang-check: Prune redundant libdeps introduced in r241653.
llvm-svn: 241680
2015-07-08 14:13:27 +00:00