Commit Graph

7939 Commits

Author SHA1 Message Date
Vedant Kumar
4858447bc5 [llvm-cov] Refactor logic for storing demangled symbols, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294135 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:10:58 +00:00
Vedant Kumar
95f974241b [llvm-cov] Fix a comment, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294134 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-05 20:10:55 +00:00
Kevin Enderby
b6a21d0438 Fix a bug in llvm-obdump(1) with the -objc-meta-data flag with -macho
which caused a hang on a malformed binary with bad bind info.

rdar://29672108


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294021 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 18:22:04 +00:00
Sanne Wouda
5f9d8e2229 [LLC] Add an inline assembly diagnostics handler.
Summary:
llc would hit a fatal error for errors in inline assembly. The
diagnostics message is now printed.

Reviewers: rengolin, MatzeB, javed.absar, anemet

Reviewed By: anemet

Subscribers: jyknight, nemanjai, llvm-commits

Differential Revision: https://reviews.llvm.org/D29408

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293999 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03 11:14:39 +00:00
Konstantin Zhuravlyov
ce0fa7d2ba llvm-readobj: fix next note entry calculation and print unknown note types
Differential Revision: https://reviews.llvm.org/D29131


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 23:44:49 +00:00
Teresa Johnson
8ffb6b14bb [ThinLTO] PrintStatistics when we exit early for thinlto-index-only
Summary:
This is necessary to get stats from the ThinLink printed before the
early exit when compiling in a distributed build.

Reviewers: mehdi_amini

Subscribers: Prazek, llvm-commits

Differential Revision: https://reviews.llvm.org/D29461

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293908 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 17:33:53 +00:00
Rui Ueyama
57b15082cd Re-submit r293820: Return Error instead of bool from mergeTypeStreams().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293847 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:47:10 +00:00
Steven Wu
9a41e59c1f [dsymutil] Fix __LINKEDIT vmsize in dsymutil upgrade path
Summary:
dsymutil upgrade path can change the size of segment and it needs to update
the vmsize of the segment to reflect the size change.

rdar://problem/30290714

Reviewers: friss

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29433

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293842 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-02 00:00:13 +00:00
Zachary Turner
8d4b01ecc0 [pdb] Add a new command for analyzing hash collisions.
This introduces the `analyze` subcommand.  For now there is only
one option, to analyze hash collisions in the type streams.  In
the future, however, we could add many more things here, such
as performing size analyses, compacting, and statistics about
the type of records etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293795 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 18:30:22 +00:00
Dean Michael Berris
dd336006bd [XRay] Use std::errc::invalid_argument instead of std::errc::bad_message
This change should appease the mingw32 builds.

Follow-up to D29319.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293725 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 00:22:20 +00:00
Dean Michael Berris
93789c8851 [XRay] Define the InstrumentationMap type
Summary:
This change implements the instrumentation map loading library which can
understand both YAML-defined instrumentation maps, and ELF 64-bit object
files that have the XRay instrumentation map section. We break it out
into a library on its own to allow for other applications to deal with
the XRay instrumentation map defined in XRay-instrumented binaries.

This type provides both raw access to the logical representation of the
instrumentation map entries as well as higher level functions for
converting a function ID into a function address.

At this point we only support ELF64 binaries and YAML-defined XRay
instrumentation maps. Future changes should extend this to support
32-bit ELF binaries, as well as other binary formats (like MachO).

As part of this change we also migrate all uses of the extraction logic
that used to be defined in tools/llvm-xray/ to use this new type and
interface for loading from files. We also remove the flag from the
`llvm-xray` tool that required users to specify the type of the
instrumentation map file being provided to instead make the library
auto-detect the file type.

Reviewers: dblaikie

Subscribers: mgorny, varno, llvm-commits

Differential Revision: https://reviews.llvm.org/D29319

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293721 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-01 00:05:29 +00:00
David Blaikie
fbad5bd691 Add a verbose/human readable mode to llvm-symbolizer to investigate discriminators and other line table/backtrace features
Patch by Simon Que!

Differential Revision: https://reviews.llvm.org/D29094

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293697 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-31 22:19:38 +00:00
Kevin Enderby
536a298311 Fix a bug in llvm-obdump(1) with the -macho flag disassembling an object
without symbols that makes calls through a symbol stub which were not
correctly being annotated with “## symbol stub for: _foo”.

Just adds the same parameters for getting the annotations from
DisAsm->getInstruction() and passing them to IP->printInst() from the
code above when boolean variable symbolTableWorked was true.

rdar://29791952


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293662 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-31 18:09:10 +00:00
Vedant Kumar
af0fd6790d Fix llvm-readobj build error after r293569
Clang complains about an ambiguous call to printNumber() because it
can't work out what size_t should convert to. I picked uint64_t.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293573 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-30 23:58:51 +00:00
Derek Schuff
c20099fa53 [WebAssembly] Add wasm support for llvm-readobj
Create a WasmDumper subclass of ObjDumper to support Webassembly binary
files.

Patch by Sam Clegg

Differential Revision: https://reviews.llvm.org/D27355

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293569 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-30 23:30:52 +00:00
Kevin Enderby
f20c973bf8 Change the llvm-obdump(1) behavior with the -macho flag and inappropriate file types.
To better match the old darwin otool(1) behavior, when llvm-obdump(1) is used
with the -macho option and the input file is not an object file simply print
the file name and this message:

foo: is not an object file

and continue on to process other input files.  Also in this case don’t exit
non-zero.  This should help in some OSS projects' with autoconf scripts
that are expecting the old darwin otool(1) behavior.

rdar://26828015


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293547 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-30 20:53:17 +00:00
Sylvestre Ledru
bd96ea7b6a Remove unused 'using' declaration. Found by clang-tidy: misc-unused-using-decls NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293382 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-28 13:42:54 +00:00
Matthias Braun
88d207542b Cleanup dump() functions.
We had various variants of defining dump() functions in LLVM. Normalize
them (this should just consistently implement the things discussed in
http://lists.llvm.org/pipermail/cfe-dev/2014-January/034323.html

For reference:
- Public headers should just declare the dump() method but not use
  LLVM_DUMP_METHOD or #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
- The definition of a dump method should look like this:
  #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
  LLVM_DUMP_METHOD void MyClass::dump() {
    // print stuff to dbgs()...
  }
  #endif

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293359 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-28 02:02:38 +00:00
Adrian McCarthy
ba78b9089a NFC: Rename PDB_ReaderType::Raw to Native for consistency with the NativeSession rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-27 00:01:55 +00:00
Davide Italiano
bf34add9c8 [obj2yaml] Produce correct output for invalid relocations.
R_X86_64_NONE can be emitted without a symbol associated (well,
in theory it should never be emitted in an ABI-compliant relocatable
object). So, if there's no symbol associated to a reloc, emit one
with an empty name, instead of crashing.

Ack'ed by Michael Spencer offline.

PR: 31768

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293224 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-26 23:12:53 +00:00
Stanislav Mekhanoshin
be4948cead Replace addEarlyAsPossiblePasses callback with adjustPassManager
This change introduces adjustPassManager target callback giving a
target an opportunity to tweak PassManagerBuilder before pass
managers are populated.

This generalizes and replaces addEarlyAsPossiblePasses target
callback. In particular that can be used to add custom passes to
extension points other than EP_EarlyAsPossible.

Differential Revision: https://reviews.llvm.org/D28336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293189 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-26 16:49:08 +00:00
Peter Collingbourne
289792dbca gold-plugin: Simplify naming of object files created with save-temps or obj-path.
Now we never append a number to the file name for task ID 0.

Differential Revision: https://reviews.llvm.org/D29160

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-26 02:07:05 +00:00
Rui Ueyama
f544b74edf Fix --Wunused-function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293131 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-26 02:03:58 +00:00
Adam Nemet
c8168e70a9 [llc] Add -pass-remarks-output
This is the opt/llc counterpart of -fsave-optimization-record to output
optimization remarks in a YAML file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293121 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-26 00:39:51 +00:00
Adam Nemet
3e4269822c [llc] Add -pass-remarks-with-hotness
Analogous to the code in opt, this enables hotness in opt-remarks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 23:55:59 +00:00
Adam Nemet
19925fc03b New OptimizationRemarkEmitter pass for MIR
This allows MIR passes to emit optimization remarks with the same level
of functionality that is available to IR passes.

It also hooks up the greedy register allocator to report spills.  This
allows for interesting use cases like increasing interleaving on a loop
until spilling of registers is observed.

I still need to experiment whether reporting every spill scales but this
demonstrates for now that the functionality works from llc
using -pass-remarks*=<pass>.

Differential Revision: https://reviews.llvm.org/D29004

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293110 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 23:20:33 +00:00
Adrian McCarthy
11e1d83ce5 NFC: Rename (PDB) RawSession to NativeSession
This eliminates one overload on the term Raw.

Differential Revision: https://reviews.llvm.org/D29098

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293104 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 22:38:55 +00:00
Kevin Enderby
0702b34637 Add a warning when the llvm-nm -print-size flag is used on a Mach-O file as
Mach-O files don’t have size information about the symbols in the object file
format unlike ELF.

Also add the part of the fix to llvm-nm that was missed with r290001 so
-arch armv7m works.

rdar://25681018


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293099 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 21:33:38 +00:00
Zachary Turner
a74ee64df5 [pdb] Correctly parse the hash adjusters table from TPI stream.
This is not a list of pairs, it is a hash table data structure. We now
correctly parse this out and dump it from llvm-pdbdump.

We still need to understand the conditions that lead to a type
getting an entry in the hash adjuster table.  That will be done
in a followup investigation / patch.

Differential Revision: https://reviews.llvm.org/D29090

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293090 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 21:17:40 +00:00
Konstantin Zhuravlyov
eb91947709 [AMDGPU] Bump up n_type for metadata v2
Differential Revision: https://reviews.llvm.org/D29115


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293083 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 20:47:17 +00:00
Dean Michael Berris
420c0701f8 Implemented color coding and Vertex labels in XRay Graph
Summary:
A patch to enable the llvm-xray graph subcommand to color edges and
vertices based on statistics and to annotate vertices with statistics.

Depends on D27243

Reviewers: dblaikie, dberris

Reviewed By: dberris

Subscribers: mgorny, llvm-commits

Differential Revision: https://reviews.llvm.org/D28225

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293031 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 07:14:43 +00:00
Peter Collingbourne
6e6c6de33b gold-plugin: Add the file path to the file open error diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293013 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-25 03:35:28 +00:00
Kevin Enderby
af0e1c5e93 Add support for the x86_thread_state32_t and
in llvm-objdump for Mach-O files add the printing of the
x86_thread_state32_t in the same format as
otool-classic(1) on darwin.

To do this the 32-bit x86 general tread state
needed to be defined in include/llvm/Support/MachO.h .

rdar://30110111


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 21:13:29 +00:00
Steven Wu
6d5a027d71 Add LC_BUILD_VERSION load command
Summary:
Add a new load command LC_BUILD_VERSION. It is a generic version of
LC_*_VERSION_MIN load_command used on Apple platforms. Instead of having
a seperate load command for each platform, LC_BUILD_VERSION is recording
platform info as an enum. It also records SDK version, min_os, and tools
that used to build the binary.

rdar://problem/29781291

Reviewers: enderby

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D29044

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292824 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 20:07:55 +00:00
Saleem Abdulrasool
4133d85d33 llvm-cxxfilt: support -_
Add the `--strip-underscore` option to llvm-cxxfilt to strip the leading
underscore.  This is useful for when dealing with targets which add a
leading underscore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292759 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-22 17:41:10 +00:00
Saleem Abdulrasool
4c5684d092 llvm-strings: remove default for -Wcovered-switch-default
Fix the -Werror build by removing the unnecessary default case in the
covered switch.  NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292708 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 02:52:29 +00:00
Saleem Abdulrasool
6d72920b21 llvm-strings: add support for -t
Allow printing the file content offset via the `-t` or `--radix` option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292707 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 02:36:28 +00:00
Saleem Abdulrasool
5e8f18007b llvm-cxxfilt: support the -s option
This is a stub implementation of the `-s` or `--format` option that
allows the user to specify the demangling style.  Since we only support
the Itanium (GNU) style demangling, auto is synonymous with `gnu`.
Simply swallow the option to permit some level of commandline
compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292706 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 02:36:26 +00:00
Zachary Turner
9c1e7a6062 [pdb] Write the Named Stream mapping to Yaml and binary.
Differential Revision: https://reviews.llvm.org/D28919

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292665 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 22:42:09 +00:00
Zachary Turner
b7d2cf75d1 [pdb] Merge NamedStreamMapBuilder and NamedStreamMap.
While the builder pattern has proven useful for certain other
larger types, in this case it was hampering the ability to use
the data structure, as for runtime access we need a map that
we can efficiently read from and write to.  So the two are merged
into a single data structure that can efficiently be read to,
written from, deserialized from bytes, and serialized to bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292664 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 22:41:40 +00:00
Saleem Abdulrasool
81f64e2be0 llvm-cxxfilt: add missing includes from previous change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292580 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 05:33:22 +00:00
Saleem Abdulrasool
08015a574d llvm-cxxfilt: fix program description
Fix a silly copy-paste error in the tool description.  Take the
opportunity to add crash stack printing which will hopefully never be
needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292579 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 05:27:09 +00:00
Saleem Abdulrasool
81cf2fa17a llvm-cxxfilt: support -t to demangle types
By default c++filt demangles functions, though you can optionally pass
`-t` to have it decode types as well, behaving nearly identical to
`__cxa_demangle`.  Add support for this mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292576 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 04:25:26 +00:00
Kevin Enderby
045015ed1f Add support for the new LC_NOTE load command.
It describes a region of arbitrary data included in a Mach-O file.
Its initial use is to record extra data in MH_CORE files.

rdar://30001545
rdar://30001731


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292500 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-19 17:36:31 +00:00
Mike Aizatsky
e7be0ad634 [sancov] applying blacklist to covered points too
Differential Revision: https://reviews.llvm.org/D28872

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292468 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-19 03:49:18 +00:00
Saleem Abdulrasool
08b49042cb llvm-cxxfilt: filter out invalid manglings
c++filt does not attempt to demangle symbols which do not match its
expected format.  This means that the symbol must start with _Z or ___Z
(block invocation function extension).  Any other symbols are returned
as is.  Note that this is different from the behaviour of __cxa_demangle
which will demangle fragments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292467 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-19 02:58:46 +00:00
Sam Parker
aa96763063 [ARM] Create objdump subtarget from build attrs
Enable an ELFObjectFile to read the its arm build attributes to
produce a target triple with a specific ARM architecture.
llvm-objdump now uses this functionality to automatically produce
a more accurate target.

Differential Revision: https://reviews.llvm.org/D28769


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292366 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 13:52:12 +00:00
Pavel Labath
c52f4a4684 Remove pid_t usage from llvm-xray
This type is not available on windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292206 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 09:39:31 +00:00
Matt Arsenault
8b76c990ba llc: Update link components
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292198 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 05:47:03 +00:00
Matt Arsenault
0f55cd487f llc: Update LLVMBuild
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292196 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 05:34:08 +00:00
Matt Arsenault
878b099978 llc: Initialize more passes
Targets can add these. Initialize them so -print-before/-print-after
etc. work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292195 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 05:11:25 +00:00
Davide Italiano
d97e73205c [llvm-objdump] Dump PT_NOTE as part of -p.
PR: 31641

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292170 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 23:13:46 +00:00
Davide Italiano
d871b20cb5 [llvm-objdump] Dump PT_GNU_RELRO as part of -p.
PR: 31641

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292169 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 22:58:26 +00:00
Davide Italiano
91010967e3 [llvm-objdump] Dump PT_OPENBSD_{BOOTDATA,RANDOMIZE,WXNEEDED}.
PR: 31641

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292167 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 22:01:41 +00:00
David Blaikie
1854d25176 Add missing header to see if that clears up the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292166 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:40:08 +00:00
David Blaikie
aab72f0669 Attempt to fix the MSVC build by using llvm::errc instead of std::errc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292163 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 21:20:51 +00:00
David Blaikie
061ca191c0 [XRay] Implement the llvm-xray graph subcommand
Here we define the `graph` subcommand which generates a graph from the function
call information and uses it to present the call information graphically with
additional annotations.

Reviewers: dblaikie, dberris

Differential Revision: https://reviews.llvm.org/D27243

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292156 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 20:36:26 +00:00
Pavel Labath
8a1006b50d [llvm-xray] Fix android build
std::to_string is not available in the android ndk. Using llvm::to_string
instead.

Committing as obvious.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292143 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-16 16:38:23 +00:00
Daniel Jasper
8b122d0496 Fix un-initialized error introduced by r291959.
This is uncovered when running tools/dsymutil/X86/empty_range.s.test
with ASAN. Haven't investigate yet, whether that means there is an ODR
violation in that test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-15 16:42:36 +00:00
Greg Clayton
b24afca5be Add a variant of DWARFDie::find() and DWARFDie::findRecursively() that takes a llvm::ArrayRef<dwarf::Attribute>.
This allows us efficiently look for more than one attribute, something that is quite common in DWARF consumption.

Differential Revision: https://reviews.llvm.org/D28704



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291967 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 22:32:12 +00:00
Greg Clayton
beabb639c5 Cleanup how DWARFDie attributes are accessed and decoded.
Removed all DWARFDie::getAttributeValueAs*() calls.
Renamed:
  Optional<DWARFFormValue> DWARFDie::getAttributeValue(dwarf::Attribute);
To:
  Optional<DWARFFormValue> DWARFDie::find(dwarf::Attribute);
Added:
  Optional<DWARFFormValue> DWARFDie::findRecursively(dwarf::Attribute);
  
All decoding of Optional<DWARFFormValue> values are now done using the dwarf::to*() functions from DWARFFormValue.h:

Old code:
  
  auto DeclLine = DWARFDie.getAttributeValueAsSignedConstant(DW_AT_decl_line).getValueOr(0);
  
New code:

  auto DeclLine = toUnsigned(DWARFDie.find(DW_AT_decl_line), 0);
  
This composition helps us since we can now easily do:

  auto DeclLine = toUnsigned(DWARFDie.findRecursively(DW_AT_decl_line), 0);
  
This allows us to easily find attribute values in the current DIE only (the first new code above) or in any DW_AT_abstract_origin or DW_AT_specification Dies using the line above. Note that the code line length is shorter and more concise.

Differential Revision: https://reviews.llvm.org/D28581



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291959 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 21:08:18 +00:00
Ivan Krasin
d6d6b83a0b Revert r291903 and r291898. Reason: they break check-lld on the bots.
Summary:
Revert [ARM] Fix ubig32_t read in ARMAttributeParser

Now using support functions to read data instead of trying to
perform casts.
===========================================================

Revert [ARM] Enable objdump to construct triple for ARM

Now that The ARMAttributeParser has been moved into the library,
it has been modified so that it can parse the attributes without
printing them and stores them in a map. ELFObjectFile now queries
the attributes to fill out the architecture details of a provided
triple for 'arm' and 'thumb' targets. llvm-objdump uses this new
functionality.

Subscribers: llvm-commits, samparker, aemerson, mgorny

Differential Revision: https://reviews.llvm.org/D28683

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291911 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 16:45:15 +00:00
George Rimar
06943952f3 [llvm-dwp] - Reuse object::Decompressor class
One more place where Decompressor class can be reused.

Differential revision: https://reviews.llvm.org/D28679



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291906 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 15:58:55 +00:00
Sam Parker
6968dd2f43 [ARM] Enable objdump to construct triple for ARM
Now that The ARMAttributeParser has been moved into the library,
it has been modified so that it can parse the attributes without
printing them and stores them in a map. ELFObjectFile now queries
the attributes to fill out the architecture details of a provided
triple for 'arm' and 'thumb' targets. llvm-objdump uses this new
functionality.

Differential Revision: https://reviews.llvm.org/D28281



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291898 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 11:04:21 +00:00
Sam Parker
93a4a6e681 [ARM] Moved ARMAttributeParser to Support
Moved ARMAttributeParser out of llvm-readobj and into the support
library.

Differential Revision: https://reviews.llvm.org/D28227



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291896 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 10:50:01 +00:00
NAKAMURA Takumi
bda0ff2479 xray-account: Avoid std::errc::bad_message to appease mingw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-13 00:17:15 +00:00
Zachary Turner
233ecbde65 [llvm-pdbdump] Add a compact dump mode.
Differential Revision: https://reviews.llvm.org/D28545

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291849 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 22:28:15 +00:00
Chris Bieneman
15135b3b8a [ObjectYAML] Pull yaml2dwarf out of yaml2obj for reuse
This patch pulls the yaml2dwarf code out of yaml2obj into a new set of DWARF emitter functions in the DWARFYAML namespace. This will enable the YAML->DWARF code to be used inside DWARF tests by populating the DWARFYAML structs and calling the Emitter functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291828 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 21:35:21 +00:00
Marcello Maggioni
eea6148176 [llvm-config] Fix obviously wrong code in parsing DyLib components.
The code parsing the string was using the offset returned from
StringRef::find() wrong, assuming it was relative to the staring
offset that is passed to the function, but the returned offset
is always relative to the beginning of the line.

This causes odd behaviour while parsing the component string.
Spotted thanks to the newly added test:

tools/llvm-config/booleans.test

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291803 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 19:47:38 +00:00
Hans Wennborg
fa3329aff5 Avoid std::errc::protocol_* to appease mingw
Like r291636 and r285261.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 18:33:14 +00:00
Simon Pilgrim
e821446fbc Fix windows buildbots building llvm-xray
2 issues:
1 - replaced unix-style pid_t with cross-platform llvm::sys::ProcessInfo::ProcessId 
2 - fixed shadow variable warning in lambda expression

Reviewed by @filcab

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291760 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 11:13:51 +00:00
Dean Michael Berris
182166ec7e [XRay] Include <numeric> for std::accumulate.
Fix-up following D24377.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291750 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 07:43:54 +00:00
Dean Michael Berris
c4416a6dc0 [XRay] Implement the llvm-xray account subcommand
Summary:
This is the third of a multi-part change to implement subcommands for
the `llvm-xray` tool.

Here we define the `account` subcommand which does simple function call
accounting, generating basic statistics on function calls we find in an
XRay log/trace. We support text output and csv output for this
subcommand.

This change also supports sorting, summing, and filtering the top N
results.

Part of this tool will later be turned into a library that could be used
for basic function call accounting.

Depends on D24376.

Reviewers: dblaikie, echristo

Subscribers: mehdi_amini, dberris, beanz, llvm-commits

Differential Revision: https://reviews.llvm.org/D24377

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291749 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-12 07:38:13 +00:00
Zachary Turner
4509ae413a [CodeView] Finish decoupling TypeDatabase from TypeDumper.
Previously the type dumper itself was passed around to a lot of different
places and manipulated in ways that were more appropriate on the type
database. For example, the entire TypeDumper was passed into the symbol
dumper, when all the symbol dumper wanted to do was lookup the name of a
TypeIndex so it could print it. That's what the TypeDatabase is for --
mapping type indices to names.

Another example is how if the user runs llvm-pdbdump with the option to
dump symbols but not types, we still have to visit all types so that we
can print minimal information about the type of a symbol, but just without
dumping full symbol records. The way we did this before is by hacking it
up so that we run everything through the type dumper with a null printer,
so that the output goes to /dev/null. But really, we don't need to dump
anything, all we want to do is build the type database. Since
TypeDatabaseVisitor now exists independently of TypeDumper, we can do
this. We just build a custom visitor callback pipeline that includes a
database visitor but not a dumper.

All the hackery around printers etc goes away. After this patch, we could
probably even delete the entire CVTypeDumper class since really all it is
at this point is a thin wrapper that hides the details of how to build a
useful visitation pipeline. It's not a priority though, so CVTypeDumper
remains for now.

After this patch we will be able to easily plug in a different style of
type dumper by only implementing the proper visitation methods to dump
one-line output and then sticking it on the pipeline.

Differential Revision: https://reviews.llvm.org/D28524

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291724 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11 23:24:22 +00:00
Greg Clayton
a9a480efd1 Remove all variants of DWARFDie::getAttributeValueAs...() that had parameters that specified default values.
Now we only support returning Optional<> values and have changed all clients over to use Optional::getValueOr().

Differential Revision: https://reviews.llvm.org/D28569


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291686 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11 17:43:37 +00:00
Chandler Carruth
c68d25fb58 [PM] Separate the LoopAnalysisManager from the LoopPassManager and move
the latter to the Transforms library.

While the loop PM uses an analysis to form the IR units, the current
plan is to have the PM itself establish and enforce both loop simplified
form and LCSSA. This would be a layering violation in the analysis
library.

Fundamentally, the idea behind the loop PM is to *transform* loops in
addition to running passes over them, so it really seemed like the most
natural place to sink this was into the transforms library.

We can't just move *everything* because we also have loop analyses that
rely on a subset of the invariants. So this patch splits the the loop
infrastructure into the analysis management that has to be part of the
analysis library, and the transform-aware pass manager.

This also required splitting the loop analyses' printer passes out to
the transforms library, which makes sense to me as running these will
transform the code into LCSSA in theory.

I haven't split the unittest though because testing one component
without the other seems nearly intractable.

Differential Revision: https://reviews.llvm.org/D28452

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291662 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11 09:43:56 +00:00
Dean Michael Berris
14cdbca6b8 [XRay] Define the library for XRay trace logs
Summary:
In this change we move the definition of the log reading routines from
the tools directory in LLVM to {include/llvm,lib}/XRay. We improve the
documentation a little bit for the publicly accessible headers, and
adjust the top-matter. This also leads to some refactoring and cleanup
in the tooling code.

In particular, we do the following:

  - Rename the class from LogReader to Trace, as it better represents
    the logical set of records as opposed to a log.
  - Use file type detection instead of asking the user to say what
    format the input file is. This allows us to keep the interface
    simple and encapsulate the logic of loading the data appropriately.

In future changes we increase the API surface and write dedicated unit
tests for the XRay library.

Depends on D24376.

Reviewers: dblaikie, echristo

Subscribers: mehdi_amini, mgorny, llvm-commits, varno

Differential Revision: https://reviews.llvm.org/D28345

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291652 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11 06:39:09 +00:00
NAKAMURA Takumi
91424c3023 tools/llvm-xray: Avoid std::errc::protocol_* to appease mingw, like r285261.
They are oriented from winsock and mingw doesn't import them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291636 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11 01:06:57 +00:00
Zachary Turner
eb6ab04fb2 [CodeView/PDB] Rename a bunch of files.
We were starting to get some name clashes between llvm-pdbdump
and the common CodeView framework, so I took this opportunity
to rename a bunch of files to more accurately describe their
usage.  This also helps in llvm-pdbdump to distinguish
between different files and whether they are used for pretty
dump mode or raw dump mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291627 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-11 00:35:43 +00:00
Michal Gorny
71b8698703 [llvm-config] Canonicalize CMake booleans to 0/1
Following the similar change to lit configuration, ensure that all CMake
booleans are canonicalized to 0/1 when being passed to llvm-config. This
fixes the incorrect interpretation of values when user passes another
value than the ON/OFF, and simplifies the code by removing unnecessary
string matching.

Furthermore, the code for --has-rtti and --has-global-isel has been
modified to print consistent values indepdently of the boolean used by
passed by the user to CMake. Sadly, the code already implicitly used
different values for the two (YES/NO for --has-rtti, ON/OFF for
--has-global-isel).

Include tests for all booleans and multi-value options in llvm-config.

Differential Revision: https://reviews.llvm.org/D28366

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291593 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 19:55:51 +00:00
Chris Bieneman
6c9c3a7a3c [ObjectYAML] Support for DWARF line tables
One more try... relanding r291541 with a fix to properly gate MaxOpsPerInst on DWARF version.

Description from r291541:

This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.

Original description:

This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 06:22:49 +00:00
Chris Bieneman
2d737382e2 Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291541.

Still failing on a bot:

http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47224/steps/test_llvm/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 05:31:23 +00:00
Chris Bieneman
e8209239b1 [ObjectYAML] Support for DWARF line tables
This patch re-lands r291470, which failed on Linux bots. The issue (I believe) was undefined behavior because the size of llvm::dwarf::LineNumberOps was not explcitly specified or consistently respected. The updated patch adds an explcit underlying type to the enum and preserves the size more correctly.

Original description:

This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291541 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 05:25:24 +00:00
Dean Michael Berris
5165d0d2b3 [XRay] Fixup includes for modules build
Remove unnecessary system header include.

Follow-up to D24376.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291533 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 03:21:54 +00:00
Dean Michael Berris
5b82745386 [XRay] Don't include <unistd.h> unnecessarily
Follow-up to D24376.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291531 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 02:51:13 +00:00
Dean Michael Berris
6e1f066adf [XRay] Implement llvm-xray convert -- trace file conversion
This is the second part of a multi-part change to define additional
subcommands to the `llvm-xray` tool.

This change defines a conversion subcommand to take XRay log files, and
turns them from one format to another (binary or YAML). This currently
only supports the first version of the log file format, defined in the
compiler-rt runtime.

Depends on D21987.

Reviewers: dblaikie, echristo

Subscribers: mehdi_amini, dberris, beanz, llvm-commits

Differential Revision: https://reviews.llvm.org/D24376

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291529 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-10 02:38:11 +00:00
Chris Bieneman
67c28b0349 Revert "[ObjectYAML] Support for DWARF line tables"
This reverts commit r291470 due to failing bots:

http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/47209/steps/test_llvm/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291471 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09 20:04:55 +00:00
Chris Bieneman
b7b948cda3 [ObjectYAML] Support for DWARF line tables
This patch adds support for the DWARF debug_lines section. The line table state machine opcodes are preserved, so this can be used to test the state machine evaluation directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291470 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-09 20:01:37 +00:00
Saleem Abdulrasool
8204fd7320 llvm-objdump: speed up -objc-meta-data
Running a Debug build of objdump -objc-meta-data with a large Mach-O file is
currently unnecessarily slow.

With some local test input, this change reduces the run time from 75-85s down
to 15-20s.

The two changes are:
  Assert on pointer equality not array equality
  Replace vector<pair<address, symbol>> with DenseMap<address, symbol>

Additionally, use a std::unique_ptr rather than handling the memory manually.

Patch by Dave Lee!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291398 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-08 19:14:15 +00:00
Hal Finkel
41b81eb904 [llvm-opt-report] Fix context-sensitive lines where nothing happened
Don't print a line multiple times, each for different inlining contexts, if
nothing happened in any context. This prevents situations like this:

 [[
  > main:
 65     |       if ((i * ni + j) % 20 == 0) fprintf
  > print_array:
 65     |       if ((i * ni + j) % 20 == 0) fprintf
 ]]

which could happen if different optimizations were missed in different inlining
contexts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291361 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07 20:21:17 +00:00
Michal Gorny
4d3523945d [llvm-config] Print --system-libs only when static linking
Modify the --system-libs option in llvm-config to print system libs only
when using static linking. The system libraries are irrelevant when
linking to a shared library since the library has appropriate library
dependencies embedded.

Modify the --system-libs test appropriately to force static linking, and
disable it if static libs are not available (i.e. BUILD_SHARED_LIBS is
enabled).

Differential Revision: https://reviews.llvm.org/D27805

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291285 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 21:33:54 +00:00
Michal Gorny
7b7a32b4ff [llvm-config] Add --cmakedir to obtain CMake module location
Add a --cmakedir option to llvm-config that returns the correct path to
built/installed CMake modules (i.e. lib/cmake/llvm). This is mostly
intended as a convenience option for stand-alone builds of other LLVM
projects that frequently reconstruct LLVM_CMAKE_PATH after querying
llvm-config.

Differential Revision: https://reviews.llvm.org/D26894

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291218 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-06 08:23:33 +00:00
Greg Clayton
d1f6d693d6 Add iterator support to DWARFDie to allow child DIE iteration.
Differential Revision: https://reviews.llvm.org/D28303



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291194 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-05 23:47:37 +00:00
Saleem Abdulrasool
50116a25c6 MC: support passing search paths to the IAS
This is needed to support inclusion in inline assembly via the
`.include` directive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291085 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-05 05:56:39 +00:00
Teresa Johnson
621de7b4c7 [ThinLTO] Rework llvm-link to use the FunctionImporter
Summary:
Change llvm-link to use the FunctionImporter handling, instead of
manually invoking the Linker. We still need to load the module
in llvm-link to do the desired testing for invalid import requests
(weak functions), and to get the GUID (in case the function is local).

Also change the drop-debug-info test to use llvm-link so that importing
is forced (in order to test debug info handling) and independent of
import logic changes.

Reviewers: mehdi_amini

Subscribers: mgorny, llvm-commits, aprantl

Differential Revision: https://reviews.llvm.org/D28277

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290964 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-04 14:27:31 +00:00
Adrian Prantl
639592de22 Add llvm-bcanalyzer support for new metadata node types.
Also sort the existing list by value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290901 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-03 19:17:49 +00:00
Saleem Abdulrasool
1efac55b93 DebugInfo: change the PDB UniqueId type to uint8_t
Since we type-erase the Windows GUID structure, use unsigned bytes
rather than char, which may be signed (-fsigned-char).  NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-30 19:42:13 +00:00
Mehdi Amini
6fc58a7278 Change Metadata Index emission in the bitcode to use 2x32 bits for the placeholder
The Bitstream reader and writer are limited to handle a "size_t" at
most, which means that we can't backpatch and read back a 64bits
value on 32 bits platform.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-28 23:45:54 +00:00
Mehdi Amini
89bf9692cc Add an index for Module Metadata record in the bitcode
This index record the position for each metadata record in
the bitcode, so that the reader will be able to lazy-load
on demand each individual record.

We also make sure that every abbrev is emitted upfront so
that the block can be skipped while reading.

I don't plan to commit this before having the reader
counterpart, but I figured this can be reviewed mostly
independently.

Recommit r290684 (was reverted in r290686 because a test
was broken) after adding a threshold to avoid emitting
the index when unnecessary (little amount of metadata).
This optimization "hides" a limitation of the ability
to backpatch in the bitstream: we can only backpatch
safely when the position has been flushed. So if we emit
an index for one metadata, it is possible that (part of)
the offset placeholder hasn't been flushed and the backpatch
will fail.

Differential Revision: https://reviews.llvm.org/D28083

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-28 22:30:28 +00:00
Saleem Abdulrasool
0ece61756a Revert "Add an index for Module Metadata record in the bitcode"
This reverts commit a0ca6ae2d3.  Revert at
Mehdi's request as it is breaking bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290686 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-28 20:37:22 +00:00
Mehdi Amini
a0ca6ae2d3 Add an index for Module Metadata record in the bitcode
Summary:
This index record the position for each metadata record in
the bitcode, so that the reader will be able to lazy-load
on demand each individual record.

We also make sure that every abbrev is emitted upfront so
that the block can be skipped while reading.

I don't plan to commit this before having the reader
counterpart, but I figured this can be reviewed mostly
independently.

Reviewers: pcc, tejohnson

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D28083

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-28 19:44:19 +00:00
Mehdi Amini
c54021df3f [ThinLTO] Honor -O{0,1,2,4} passed through the libLTO interface for ThinLTO
This was hardcoded to be O3 till now, without any way to change it
without changing the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-28 19:37:16 +00:00
Hemant Kulkarni
3ba879a532 llvm-readobj: ELF: Make DT tags machine aware
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-27 19:59:29 +00:00
Ed Maste
82c36cf6c5 llvm-objdump: sort phdr type strings in advance of adding new ones
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-24 14:53:45 +00:00
Mehdi Amini
8e3d0e728e llvm-size: remove leading dash in '-radix' option
cl::opt does not accept such option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:55:08 +00:00
Mehdi Amini
5142beb6ca llvm-readobj: remove leading dash in '-a' option (ARMAttributesShort)
cl::opt does not accept such option

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290465 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:54:52 +00:00
Mehdi Amini
ec1ef03d3b llvm-lto2: remove leading '-' for cl::opt declaration
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290464 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:54:34 +00:00
Mehdi Amini
de4b9a37d4 llvm-lto2: Print diagnostics before exiting (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290463 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:54:17 +00:00
Mehdi Amini
cda4dc6c3d llvm-lto: pass errs() to the module verifier (NFC)
It is more friendly to have the actual diagnostic when the
verifier fails.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290462 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-23 23:53:57 +00:00
Chris Bieneman
2feb23fd5e [ObjectYAML] Fixing a compiler warning
Accidentally re-defined the variable instead of setting it. Oops!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 22:58:07 +00:00
Chris Bieneman
7d466455bd [ObjectYAML] Support for DWARF debug_info section
This patch adds support for YAML<->DWARF for debug_info sections.

This re-lands r290147, reverted in 290148, re-landed in r290204 after fixing the issue that caused bots to fail (thank you UBSan!), and reverted again in r290209 due to failures on big endian systems.

After adding support for preserving endianness, this should be good now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 22:44:27 +00:00
Chris Bieneman
29c28815d8 [ObjectYAML] Fixing big endian bots from r290381
Bot URL:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2505

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 22:16:04 +00:00
Chris Bieneman
5e76a3fd3b [ObjectYAML] MachO support for endianness
This patch adds support to the macho<->yaml tools for preserving endianness in MachO structures and DWARF data.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290381 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-22 21:58:03 +00:00
Peter Collingbourne
ea3f918aec IR: Function summary representation for type tests.
Each function summary has an attached list of type identifier GUIDs. The
idea is that during the regular LTO phase we would match these GUIDs to type
identifiers defined by the regular LTO module and store the resolutions in
a top-level "type identifier summary" (which will be implemented separately).

Differential Revision: https://reviews.llvm.org/D27967

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 23:03:45 +00:00
Mike Aizatsky
57e4fa8aaa [sancov] skip duplicated points
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 22:10:01 +00:00
Mike Aizatsky
fd40c60332 [sancov] hash prefix results in huge merge files, use shorter prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 22:09:57 +00:00
Justin Bogner
8bddda3652 cmake: Don't build llvm-config and tblgen concurrently in cross builds
This sets USES_TERMINAL for the native llvm-config build, so that it
doesn't run at the same time as builds of other native tools (namely,
tablegen). Without this, if you're very unlucky with the timing it's
possible to be relinking libSupport as one of the tools is linking,
causing a spurious failure.

The tablegen build adopted USES_TERMINAL for this same reason in
r280748.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-21 21:19:00 +00:00
Chris Bieneman
4138b67a0a Revert "[ObjectYAML] Support for DWARF debug_info section"
This reverts commit r290204.

Still breaking bots... In a meeting now, so I can't fix it immediately.

Bot URL:
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/2415

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290209 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-20 22:36:42 +00:00
Chris Bieneman
0ef22e255c [ObjectYAML] Support for DWARF debug_info section
This patch adds support for YAML<->DWARF for debug_info sections.

This re-lands r290147, after fixing the issue that caused bots to fail (thank you UBSan!).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290204 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-20 21:35:31 +00:00
Chris Bieneman
23755c9509 Revert "[ObjectYAML] Support for DWARF debug_info section"
This reverts commit r290147.

This commit is breaking a bot (http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/621). I don't have time to investigate at the moment, so I'll revert for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290148 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-20 00:42:06 +00:00
Chris Bieneman
eca8f9afc6 [ObjectYAML] Support for DWARF debug_info section
This patch adds support for YAML<->DWARF for debug_info sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290147 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-20 00:26:24 +00:00
Chris Bieneman
c2813d918a [ObjectYAML] Support for DWARF Pub Sections
This patch adds support for YAML<->DWARF round tripping for pub* section data. The patch supports both GNU and non-GNU style entries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-19 22:22:12 +00:00
Greg Clayton
655737aec3 Make a function to correctly extract the DW_AT_high_pc given the low pc value.
DWARF 4 and later supports encoding the PC as an address or as as offset from the low PC. Clients using DWARFDie should be insulated from how to extract the high PC value. This function takes care of extracting the form value and looking for the correct form.

Differential Revision: https://reviews.llvm.org/D27885


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-19 20:36:41 +00:00
Mike Aizatsky
77972972a3 [sancov] skip dead files from computations
Differential Revision: https://reviews.llvm.org/D27863

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-17 00:11:48 +00:00
Kevin Enderby
398ecdfe0a Fix a bugs with using some Mach-O command line flags like "-arch armv7m".
The Mach-O command line flag like "-arch armv7m" does not match the
arch name part of its llvm Triple which is "thumbv7m-apple-darwin”.

I think the best way to fix this is to have
llvm::object::MachOObjectFile::getArchTriple() optionally return the
name of the Mach-O arch flag that would be used with -arch that
matches the CPUType and CPUSubType.  Then change
llvm::object::MachOUniversalBinary::ObjectForArch::getArchTypeName()
to use that and change it to getArchFlagName() as the type name is
really part of the Triple and the -arch flag name is a Mach-O thing
for a specific Triple with a specific Mcpu value.

rdar://29663637


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290001 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 22:54:02 +00:00
Zachary Turner
3b75dc7441 Resubmit "[CodeView] Hook CodeViewRecordIO for reading/writing symbols."
The original patch was broken due to some undefined behavior
as well as warnings that were triggering -Werror.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290000 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 22:48:14 +00:00
Zachary Turner
56bfe966c9 Revert "[CodeView] Hook CodeViewRecordIO for reading/writing symbols."
This reverts commit r289978, which is failing due to some rebase/merge
issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289981 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 19:25:23 +00:00
Zachary Turner
b6ef4f69db [CodeView] Hook CodeViewRecordIO for reading/writing symbols.
This is the 3rd of 3 patches to get reading and writing of
CodeView symbol and type records to use a single codepath.

Differential Revision: https://reviews.llvm.org/D26427

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 19:20:35 +00:00
Dehao Chen
7e4360079c Pass sample pgo flags to thinlto.
Summary: ThinLTO needs to invoke SampleProfileLoader pass during link time in order to annotate profile correctly after module importing.

Reviewers: davidxl, mehdi_amini, tejohnson

Subscribers: pcc, davide, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D27790

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289957 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 16:48:46 +00:00
Peter Collingbourne
d150401278 IPO: Introduce ThinLTOBitcodeWriter pass.
This pass prepares a module containing type metadata for ThinLTO by splitting
it into regular and thin LTO parts if possible, and writing both parts to
a multi-module bitcode file. Modules that do not contain type metadata are
written unmodified as a single module.

All globals with type metadata are added to the regular LTO module, and
the rest are added to the thin LTO module.

Differential Revision: https://reviews.llvm.org/D27324

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289899 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-16 00:26:30 +00:00
Prakhar Bahuguna
af672fb209 [ARM] Implement execute-only support in CodeGen
This implements execute-only support for ARM code generation, which
prevents the compiler from generating data accesses to code sections.
The following changes are involved:

* Add the CodeGen option "-arm-execute-only" to the ARM code generator.
* Add the clang flag "-mexecute-only" as well as the GCC-compatible
  alias "-mpure-code" to enable this option.
* When enabled, literal pools are replaced with MOVW/MOVT instructions,
  with VMOV used in addition for floating-point literals. As the MOVT
  instruction is required, execute-only support is only available in
  Thumb mode for targets supporting ARMv8-M baseline or Thumb2.
* Jump tables are placed in data sections when in execute-only mode.
* The execute-only text section is assigned section ID 0, and is
  marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'.
  This also overrides selection of ELF sections for globals.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-15 07:59:08 +00:00
Yaxun Liu
4ebefd4b3e Attempt to fix llvm-readobj crash on ppc64 due to r289674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-15 06:59:23 +00:00
Greg Clayton
c64f919f1c Add the ability to get attribute values as Optional<T>
When getting attributes it is sometimes nicer to use Optional<T> some of the time instead of magic values. I tried to cut over to only using the Optional values but it made many of the call sites very messy, so it makes sense the leave in the calls that can return a default value. Otherwise code that looks like this:

uint64_t CallColumn = Die.getAttributeValueAsAddress(DW_AT_call_line, 0);

Has to be turned into:

uint64_t CallColumn = 0;
if (auto CallColumnValue = Die.getAttributeValueAsAddress(DW_AT_call_line))
    CallColumn = *CallColumnValue;

The first snippet of code looks much better. But in cases where you want an offset that may or may not be there, the following code looks better:

if (auto StmtOffset = Die.getAttributeValueAsSectionOffset(DW_AT_stmt_list)) {
  // Use StmtOffset
}

Differential Revision: https://reviews.llvm.org/D27772



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 22:38:08 +00:00
Yaxun Liu
d2fea82b59 AMDGPU: Emit runtime metadata version 2 as YAML
Differential Revision: https://reviews.llvm.org/D25046


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289674 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 17:16:52 +00:00
Mehdi Amini
dbca62ee4e [ThinLTO] Add an API to trigger file-based API for returning objects to the linker
Summary:
The motivation is to support better the -object_path_lto option on
Darwin. The linker needs to write down the generate object files on
disk for later use by lldb or dsymutil (debug info are not present
in the final binary). We're moving this into libLTO so that we can
be smarter when a cache is enabled and hard-link when possible
instead of duplicating the files.

Reviewers: tejohnson, deadalnix, pcc

Subscribers: dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D27507

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-14 04:56:42 +00:00
Greg Clayton
e96000e8bd Switch functions that returned bool and filled in a DWARFFormValue arg with ones that return Optional<DWARFFormValue>
Differential Revision: https://reviews.llvm.org/D27737



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289611 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 23:20:56 +00:00
Peter Collingbourne
06f5b6a274 llvm-cat: Allow bitcode files to be created with no modules.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289610 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 23:14:55 +00:00
Chris Bieneman
23d0163e61 [llvm-config] Fixing one check where shared libs implied dylib
We shouldn't print the dylib if LinkDylib is false.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289609 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 23:08:52 +00:00
Derek Schuff
38087e591e llvm-config: Set LinkMode in addition to LinkDyLib when using --ignore-llvm
Summary:
LinkDyLib is only used (before arg processing) to set up the default for
LinkMode. So reset LinkMode as well, and process before --link-shared or
--link-static to allow those flags to continue to override it.

Reviewers: beanz

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D27736

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 23:01:53 +00:00
Chris Bieneman
741933d3a4 [llvm-config] Add --ignore-libllvm
This flag forces off linking libLLVM. This should resolve some issues reported on llvm-commits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289605 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 22:17:59 +00:00
Alexei Starovoitov
6d5780f9b9 [bpf] change llvm-objdump to print dec instead of hex
since bpf instruction stream is multiple of 8 change llvm-objdump
to print decimal instruction number instead of hex address, so that
users don't have to do this math manually to match kernel verifier output

Signed-off-by: Alexei Starovoitov <ast@kernel.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289569 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 19:07:08 +00:00
Greg Clayton
adb170fc81 Make a DWARFDIE class that can help avoid using the wrong DWARFUnit when extracting attributes
Many places pass around a DWARFDebugInfoEntryMinimal and a DWARFUnit. It is easy to get things wrong by using the wrong DWARFUnit with a DWARFDebugInfoEntryMinimal. This patch creates a DWARFDie class that contains the DWARFUnit and DWARFDebugInfoEntryMinimal objects so that they can't get out of sync. All attribute extraction has been moved out of DWARFDebugInfoEntryMinimal and into DWARFDie. DWARFDebugInfoEntryMinimal was also renamed to DWARFDebugInfoEntry.

DWARFDie objects are temporary objects that are used by clients and contain 2 pointers that you always need to have anyway. Keeping them grouped will avoid errors and simplify many of the attribute extracting APIs by not having to pass in a DWARFUnit.

Differential Revision: https://reviews.llvm.org/D27634


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-13 18:25:19 +00:00
Dan Liew
5340b5b3d9 [llvm-config] Fix bug where --libfiles and --names would produce
incorrect output when LLVM is built with `LLVM_BUILD_LLVM_DYLIB`.

`llvm-config` previously produced output like this

```
$ llvm-config --libfiles
/usr/lib/liblibLLVM-4.0svn.so.so
$ llvm-config --libnames
liblibLLVM-4.0svn.so.so
```

The library prefix and shared library extension were added to
the library name twice which was wrong.

I wanted to write a test cases for this but it looks like **all**
`llvm-config` tests were disabled by r260386 so I'll leave this for
now.

Subscribers: llvm-commits, tstellarAMD

Reviewers: beanz, DiamondLovesYou, axw

Differential Revision: https://reviews.llvm.org/D27393

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289488 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-12 23:07:22 +00:00
Chris Bieneman
d1dcfd2b00 clang-format to fix post-commit feedback
Thanks dblaikie!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289485 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-12 23:05:15 +00:00
Chris Bieneman
18245f6cf7 [ObjectYAML] Support for DWARF debug_aranges
This patch adds support for round tripping DWARF debug_aranges in and out of YAML.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289161 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-09 00:26:44 +00:00
Chris Bieneman
4d6c7e915f [ObjectYAML] Remove DWARF from class names
Since all the DWARF classes are in a DWARFYAML namespace having every class start with DWARF seems like a bit of overkill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289080 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 17:46:57 +00:00
NAKAMURA Takumi
c3e85bfe21 Prune unused libdeps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289060 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 15:28:02 +00:00
Peter Collingbourne
8bb25c4bc6 LTO: Hash the parts of the LTO configuration that affect code generation.
Most importantly, we need to hash the relocation model, otherwise we can
end up trying to link non-PIC object files into PIEs or DSOs.

Differential Revision: https://reviews.llvm.org/D27556

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 05:28:30 +00:00
Chris Bieneman
581f04c40e [yaml2obj] Refactor and abstract yaml2dwarf functions
This abstracts the code for emitting DWARF binary from the DWARFYAML types into reusable interfaces that could be used by ELF and COFF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 22:30:15 +00:00
Chris Bieneman
1523505168 [obj2yaml] Refactor and abstract dwarf2yaml
This makes the dwarf2yaml code separated and reusable allowing ELF and COFF to share implementations with MachO.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288986 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:47:28 +00:00
Chris Bieneman
31adbb659a [ObjectYAML] Pull DWARF support into DWARFYAML namespace
Since DWARF formatting is agnostic to the object file it is stored in, it doesn't make sense for this to be in the MachOYAML implementation. Pulling it into its own namespace means we could modify the ELF and COFF YAML tools to emit DWARF as well.

In a follow-up patch I will better abstract this in obj2yaml and yaml2obj so that the DWARF bits in the tools can be re-used too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 21:26:32 +00:00
Chris Bieneman
cf24fcb20a [ObjectYAML] Support for DWARF __debug_abbrev section
This patch adds support for round-tripping DWARF debug abbreviations through the obj<->yaml tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-07 18:52:59 +00:00
Davide Italiano
1e15122076 [llc] Fix -stop-after=consthoist initializing the pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288864 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 23:49:58 +00:00
George Rimar
1f9118e823 [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA header
These are OpenBSD specific program headers.

OpenBSD commit:
d39116912b

It is required for fixing PR31288.

Differential revision: https://reviews.llvm.org/D27456

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288831 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 17:55:52 +00:00
Chris Bieneman
4a6766e76f [ObjectYAML] First bit of support for encoding DWARF in MachO
This patch adds the starting support for encoding data from the MachO __DWARF segment. The first section supported is the __debug_str section because it is the simplest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 06:00:49 +00:00
Mandeep Singh Grang
9196899788 [llvm] Fix D26214: Move error handling out of MC and to the callers.
Summary: Related clang patch; https://reviews.llvm.org/D27360

Reviewers: t.p.northover, grosbach, compnerd, echristo

Subscribers: compnerd, mehdi_amini, llvm-commits

Differential Revision: https://reviews.llvm.org/D27359

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288763 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 02:49:17 +00:00
Bob Haarman
db18d34db4 revert inadvertedly introduced build break
Summary:
r288722 introduced a build break due some code that should
not have been part of the commit. This change removes the offending
code.

Reviewers: davide, ruiu

Differential Revision: https://reviews.llvm.org/D27435


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288742 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 00:55:55 +00:00
Bob Haarman
9398e86991 [pdb] handle missing pdb streams more gracefully
Summary: The code we use to read PDBs assumed that streams we ask it to read exist, and would read memory outside a vector and crash if this wasn't the case. This would, for example, cause llvm-pdbdump to crash on PDBs generated by lld. This patch handles such cases more gracefully: the PDB reading code in LLVM now reports errors when asked to get a stream that is not present, and llvm-pdbdump will report missing streams and continue processing streams that are present.

Reviewers: ruiu, zturner

Subscribers: thakis, amccarth

Differential Revision: https://reviews.llvm.org/D27325

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288722 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 22:44:00 +00:00
Rafael Espindola
fb309b5c31 Always use / as the path separator.
It is not clear if it is worth the complexity to use \ on
windows. This should fix the bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 07:27:02 +00:00
Rafael Espindola
2f8ebc0662 Prefix path when displaying thin archives.
Patch by Mark Santaniello.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288615 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-04 06:52:30 +00:00
Peter Collingbourne
a11b564b77 llvm-modextract: Call keep() on the output stream before exiting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 23:13:11 +00:00
David Blaikie
2af4e8b52a [dsymutil] Simplify a lazy-init condition/expression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288423 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 22:04:16 +00:00
Kevin Enderby
eafdc6f2a2 Fix a bug with llvm-size and the -m option with multiple files not printing the file names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 19:12:55 +00:00
Greg Clayton
fc1fc8ba78 This change removes the dependency on DwarfDebug that was used for DW_FORM_ref_addr by making a new DIEUnit class in DIE.cpp.
The DIEUnit class represents a compile or type unit and it owns the unit DIE as an instance variable. This allows anyone with a DIE, to get the unit DIE, and then get back to its DIEUnit without adding any new ivars to the DIE class. Why was this needed? The DIE class has an Offset that is always the CU relative DIE offset, not the "offset in debug info section" as was commented in the header file (the comment has been corrected). This is great for performance because most DIE references are compile unit relative and this means most code that accessed the DIE's offset didn't need to make it into a compile unit relative offset because it already was. When we needed to emit a DW_FORM_ref_addr though, we needed to find the absolute offset of the DIE by finding the DIE's compile/type unit. This class did have the absolute debug info/type offset and could be added to the CU relative offset to compute the absolute offset. With this change we can easily get back to a DIE's DIEUnit which will have this needed offset. Prior to this is required having a DwarfDebug and required calling:

DwarfCompileUnit *DwarfDebug::lookupUnit(const DIE *CU) const;
Now we can use the DIEUnit class to do so without needing DwarfDebug. All clients now use DIEUnit objects (the DwarfDebug stack and the DwarfLinker). A follow on patch for the DWARF generator will also take advantage of this.

Differential Revision: https://reviews.llvm.org/D27170



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 18:56:29 +00:00
Mandeep Singh Grang
017b7af32a [llvm] Implement support for -defsym assembler option
Summary:
Changes to llvm-mc to move common logic to separate function.

Related clang patch: https://reviews.llvm.org/D26213

Reviewers: rafael, t.p.northover, colinl, echristo, rengolin

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26214

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288396 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 18:42:04 +00:00
Peter Collingbourne
e3134b8c5c Object: Set SF_Indirect in ModuleSymbolTable.
This lets us remove the last use of IRObjectFile::getSymbolGV() in llvm-nm.

Differential Revision: https://reviews.llvm.org/D27076

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 07:00:35 +00:00
Peter Collingbourne
71fc8a346a Object: Add SF_Executable symbol flag.
This allows us to remove a few uses of IRObjectFile::getSymbolGV() in
llvm-nm.

While here change host-dependent logic in llvm-nm to target-dependent
logic.

Differential Revision: https://reviews.llvm.org/D27075

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 06:53:47 +00:00
Peter Collingbourne
ca0a598f5b Bitcode: Correctly handle Fixed and VBR arrays in BitstreamCursor::skipRecord().
The assertions were wrong; we need to call getEncodingData() on the element,
not the array. While here, simplify the skipRecord() implementation for Fixed
and Char6 arrays. This is tested by the code I added to llvm-bcanalyzer
which makes sure that we can skip any record.

Differential Revision: https://reviews.llvm.org/D27241

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01 05:47:58 +00:00
Peter Collingbourne
5c1bc63307 llvm-lto2: Simpler workaround for PR30396.
Maintain the command line resolutions as a map to a list of resolutions
rather than a single resolution, and apply the resolutions in the order
observed. This is not only simpler but allows us to test the scenario where
the two symbols have different resolutions.

Differential Revision: https://reviews.llvm.org/D27285

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288288 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 23:19:05 +00:00
Derek Schuff
7a578c9156 [WebAssembly] Add llvm-objdump support for wasm file format
This is the first part of an effort to add wasm binary
support across all llvm tools.

Patch by Sam Clegg

Differential Revision: https://reviews.llvm.org/D26172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 16:49:11 +00:00
Benjamin Kramer
bf60ce0ebd Apply clang-tidy's 'performance-faster-string-find' check to LLVM.
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288235 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-30 10:01:11 +00:00
Peter Collingbourne
e8971cbe03 Add another missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288217 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 23:22:55 +00:00
Peter Collingbourne
c67ca17e5e Add llvm-modextract tool.
This program is for testing features that rely on multi-module bitcode files.
It takes a multi-module bitcode file, extracts one of the modules and writes
it to the output file.

Differential Revision: https://reviews.llvm.org/D26778

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:54:33 +00:00
Kevin Enderby
dc150d07a5 Add to llvm-objdump the -no-leading-headers option with the use of the -macho option.
In some cases the leading headers of the file name, archive member and
architecture slice name in the output of lvm-objdump is not wanted so the
tool’s output can be directly used by scripts.  This matches the -X option
of the Apple otool(1) program.

rdar://28491674


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288199 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:43:40 +00:00
Peter Collingbourne
2a4cea29fc Add missing dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288198 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 21:02:19 +00:00
Peter Collingbourne
e6480e2add Bitcode: Introduce BitcodeWriter interface.
This interface allows clients to write multiple modules to a single
bitcode file. Also introduce the llvm-cat utility which can be used
to create a bitcode file containing multiple modules.

Differential Revision: https://reviews.llvm.org/D26179

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288195 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-29 20:43:47 +00:00
Peter Collingbourne
045ffc4b32 Object: Add IRObjectFile::getTargetTriple().
This lets us remove a use of IRObjectFile::getModule() in llvm-nm.

Differential Revision: https://reviews.llvm.org/D27074

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-24 01:13:09 +00:00
Meador Inge
882017a7cb llvm-nm: Print correct symbol types for init and fini sections
This patch fixes a small bug where symbols defined in the INIT
and FINI sections were incorrectly getting a type of 'n'.

Differential Revision: https://reviews.llvm.org/D26937

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287803 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:17:20 +00:00
Meador Inge
54801d6fa5 llvm-nm: Don't print value or size for undefined or weak symbols
Undefined and weak symbols don't have a meaningful size or value.
As such, nothing should be printed for those attributes (this is
already done for the address with 'U') with the BSD format.  This
matches what GNU nm does.

Note that for the POSIX.2 format [1] zero values are still
printed for the size and value.  This seems in spirit with
the format strings in that specification, but is debatable.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/

Differential Revision: https://reviews.llvm.org/D26936

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287802 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 20:17:15 +00:00
Hemant Kulkarni
fe8bde7e92 llvm-readobj: Use hash tables to print dynamic symbols.
-symbols prints both .symtab and .dynsym symbols for GNU style in ELF.
-dyn-symbols prints symbols looking up through hash tables. This helps validate hash tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287786 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-23 18:04:23 +00:00
Alex Lorenz
c636d7a9a3 [llvm-cov] Avoid 0% when reporting something that's 0/0
This commit makes llvm-cov avoid showing 0% (0/0) coverage for things
like file function coverage, etc. in reports and HTML output. This can happen
for files like headers that have macros but no functions. This commit makes
llvm-cov report - (0/0) instead.

rdar://29246480

Differential Revision: https://reviews.llvm.org/D26615


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287539 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21 14:00:04 +00:00
Simon Pilgrim
84354d97d5 Fix spelling mistakes in Tools/Tests comments. NFC.
Identified by Pedro Giffuni in PR27636.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287489 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-20 13:31:13 +00:00
Mehdi Amini
1bb4b12315 Change setDiagnosticsOutputFile to take a unique_ptr from a raw pointer (NFC)
Summary:
This makes it explicit that ownership is taken. Also replace all `new`
with make_unique<> at call sites.

Reviewers: anemet

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D26884

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 18:19:41 +00:00
Chris Bieneman
c466a4a7fd [CMake] llvm-lto2 depends on intrinsics_gen
llvm-lto2.cpp has the following include chain:

llvm/LTO/Caching.h
llvm/LTO/LTO.h
llvm/CodeGen/Analysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-lto2 needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 03:19:58 +00:00
Chris Bieneman
f6f5514e8f [CMake] opt depends on intrinsics_gen
AnalysisWrappers.cpp has the following include chain:

llvm/Analysis/CallGraph.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means opt needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287433 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 03:18:50 +00:00
Chris Bieneman
252aa32d02 [CMake] llvm-nm depends on intrinsics_gen
llvm-nm.cpp has the following include chain:

llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-nm needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287432 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 03:16:33 +00:00
Chris Bieneman
f11a790abc [CMake] llvm-link depends on intrinsics_gen
llvm-link.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-link needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:36:28 +00:00
Chris Bieneman
4339d8bd93 [CMake] llvm-extract depends on intrinsics_gen
llvm-extract.cpp has the following include chain:

llvm/Bitcode/BitcodeWriterPass.h
llvm/IR/PassManager.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-extract needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287430 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:33:57 +00:00
Chris Bieneman
f079d1b63c [CMake] llvm-dwp depends on intrinsics_gen
llvm-dwp.cpp has the following include chain:

llvm/CodeGen/AsmPrinter.h
llvm/CodeGen/MachineFunctionPass.h
llvm/CodeGen/MachineFunction.h
llvm/CodeGen/MachineBasicBlock.h
llvm/CodeGen/MachineInstr.h
llvm/Analysis/AliasAnalysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-dwp needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287429 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:33:42 +00:00
Chris Bieneman
11f7af97fc [CMake] llvm-dis depends on intrinsics_gen
llvm-dis.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-dis needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:31:14 +00:00
Chris Bieneman
34c6cea098 [CMake] llvm-diff depends on intrinsics_gen
llvm-diff.cpp has the following include chain:

llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-diff needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:28:18 +00:00
Chris Bieneman
255346047f [CMake] llvm-stress depends on intrinsics_gen
llvm-stress.cpp has the following include chain:

llvm/Analysis/CallGraphSCCPass.h
llvm/Analysis/CallGraph.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-stress needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287426 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:25:54 +00:00
Chris Bieneman
801fb8c030 [CMake] bugpoint-passes depends on intrinsics_gen
TestPasses.cpp has the following include chain:

llvm/IR/InstVisitor.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means bugpoint-passes needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:20:59 +00:00
Chris Bieneman
9f6a4f377e [CMake] llvm-bcanalyzer depends on intrinsics_gen
llvm-bcanalyzer.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-bcanalyzer needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287424 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:17:12 +00:00
Chris Bieneman
70a97679f3 [CMake] llvm-as depends on intrinsics_gen
llvm-as.cpp has the following include chain:

llvm/Bitcode/BitcodeWriter.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-as needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287423 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:15:04 +00:00
Chris Bieneman
2e7d7fa23f [CMake] llc depends on intrinsics_gen
llc.cpp has the following include chain:

llvm/Analysis/TargetLibraryInfo.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llc needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:12:03 +00:00
Chris Bieneman
ef6571d1c3 [CMake] lli-child-target depends on intrinsics gen
Messed up in r287420, it isn't just lli, but also but lli-child-target that need to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287421 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:09:51 +00:00
Chris Bieneman
2eb4133a38 [CMake] lli depends on intrinsics_gen
ChildTarget.cpp has the following include chain:

llvm/ExecutionEngine/Orc/OrcABISupport.h
llvm/ExecutionEngine/Orc/IndirectionUtils.h
llvm/IR/IRBuilder.h
llvm/IR/ConstantFolder.h
llvm/IR/InstrTypes.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means lli needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287420 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:05:19 +00:00
Chris Bieneman
6f60be5bfa [CMake] llvm-dsymutil depends on intrinsics_gen
DwarfLinker.cpp has the following include chain:

llvm/CodeGen/AsmPrinter.h
llvm/CodeGen/MachineFunctionPass.h
llvm/CodeGen/MachineFunction.h
llvm/CodeGen/MachineBasicBlock.h
llvm/CodeGen/MachineInstr.h
llvm/Analysis/AliasAnalysis.h
llvm/IR/CallSite.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means llvm-dsymutil needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 02:02:46 +00:00
Chris Bieneman
fae8230562 [CMake] verify-uselistorder depends on intrinsics_gen
verify-uselistorder.cpp has the following include chain:

llvm/Bitcode/BitcodeReader.h
llvm/IR/ModuleSummaryIndex.h
llvm/IR/Module.h
llvm/IR/Function.h
llvm/IR/Argument.h
llvm/IR/Attributes.h
llvm/IR/Attributes.gen

This means verify-uselistorder needs to depend on intrinsics_gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287405 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-18 23:30:58 +00:00