Skip to content
  1. Apr 01, 2016
    • Jeroen Ketema's avatar
      [OCaml] Reinstate data_layout · c110fbc2
      Jeroen Ketema authored
      Expose LLVMCreateTargetMachineData as data_layout.
      
      As r263530 did for go. From that commit: "LLVMGetTargetDataLayout was
      removed from the C API, and then TargetMachine.TargetData was removed.
      Later, LLVMCreateTargetMachineData was added to the C API"
      
      Differential Revision: http://reviews.llvm.org/D18677
      
      llvm-svn: 265115
      c110fbc2
  2. Mar 31, 2016
  3. Mar 15, 2016
  4. Feb 16, 2016
  5. Feb 12, 2016
  6. Jan 26, 2016
    • Chris Bieneman's avatar
      Remove autoconf support · e49730d4
      Chris Bieneman authored
      Summary:
      This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html
      
      "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
      - Obi Wan Kenobi
      
      Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark
      
      Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D16471
      
      llvm-svn: 258861
      e49730d4
  7. Dec 19, 2015
    • Rafael Espindola's avatar
      Deprecate a few C APIs. · 2339ffed
      Rafael Espindola authored
      This deprecates:
      * LLVMParseBitcode
      * LLVMParseBitcodeInContext
      * LLVMGetBitcodeModuleInContext
      * LLVMGetBitcodeModule
      
      They are replaced with the functions with a 2 suffix which do not record
      a diagnostic.
      
      llvm-svn: 256065
      2339ffed
  8. Dec 18, 2015
    • Eric Christopher's avatar
      Reorganize the C API headers to improve build times. · a6b96004
      Eric Christopher authored
      Type specific declarations have been moved to Type.h and error handling
      routines have been moved to ErrorHandling.h. Both are included in Core.h
      so nothing should change for projects directly including the headers,
      but transitive dependencies may be affected.
      
      llvm-svn: 255965
      a6b96004
  9. Dec 17, 2015
  10. Nov 10, 2015
    • Richard Diamond's avatar
      Fix `llvm-config` to adapt to the install environment. · 72303a24
      Richard Diamond authored
      Summary:
      This patch does a couple of things:
      
        - Adds a new argument `--shared-mode` which accepts a list of components and prints whether or not the provided components need to be linked statically or shared.
        - Fixes `--libnames` when CMake BUILD_SHARED_LIBS is used.
        - Fixes `--libnames`, `--libs`, and `--libfiles` for dylib when static components aren't installed.
        - Fixes `--libnames`, `--libs`, `--libfiles`, and `--components` to use LLVM_DYLIB_COMPONENTS as the component manifest for dylib linking.
        - Uses the host platform's usual convention for filename extensions and such, instead of always defaulting to Unix-izms.
      
      Because I don't own a Mac, I am not able to test the Mac platform dependent stuff locally. If someone would be willing to run a build for me on their machine (unless there's a better option), I'd appreciate it.
      
      Reviewers: jfb, brad.king, whitequark, beanz
      
      Subscribers: beanz, jauhien, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D13198
      
      llvm-svn: 252532
      72303a24
  11. Nov 05, 2015
    • Peter Collingbourne's avatar
      DI: Reverse direction of subprogram -> function edge. · d4bff303
      Peter Collingbourne authored
      Previously, subprograms contained a metadata reference to the function they
      described. Because most clients need to get or set a subprogram for a given
      function rather than the other way around, this created unneeded inefficiency.
      
      For example, many passes needed to call the function llvm::makeSubprogramMap()
      to build a mapping from functions to subprograms, and the IR linker needed to
      fix up function references in a way that caused quadratic complexity in the IR
      linking phase of LTO.
      
      This change reverses the direction of the edge by storing the subprogram as
      function-level metadata and removing DISubprogram's function field.
      
      Since this is an IR change, a bitcode upgrade has been provided.
      
      Fixes PR23367. An upgrade script for textual IR for out-of-tree clients is
      attached to the PR.
      
      Differential Revision: http://reviews.llvm.org/D14265
      
      llvm-svn: 252219
      d4bff303
  12. Oct 21, 2015
  13. Oct 15, 2015
  14. Sep 06, 2015
  15. Aug 18, 2015
    • Chandler Carruth's avatar
      [PM/AA] Remove the last relics of the separate IPA library from LLVM, · 7adc3a2b
      Chandler Carruth authored
      folding the code into the main Analysis library.
      
      There already wasn't much of a distinction between Analysis and IPA.
      A number of the passes in Analysis are actually IPA passes, and there
      doesn't seem to be any advantage to separating them.
      
      Moreover, it makes it hard to have interactions between analyses that
      are both local and interprocedural. In trying to make the Alias Analysis
      infrastructure work with the new pass manager, it becomes particularly
      awkward to navigate this split.
      
      I've tried to find all the places where we referenced this, but I may
      have missed some. I have also adjusted the C API to continue to be
      equivalently functional after this change.
      
      Differential Revision: http://reviews.llvm.org/D12075
      
      llvm-svn: 245318
      7adc3a2b
  16. Aug 05, 2015
    • Richard Diamond's avatar
      Revert "Fix `llvm-config` to emit the linker flag for the combined shared... · 23280472
      Richard Diamond authored
      Revert "Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components."
      
      It seems I was wrong thinking `autoconf`/`make` only installed shared libraries if configured with `--enable-shared`, even if `--disable-static` is present. I'll re-address with a followup patch.
      
      This reverts commit r243297 for causing PR#24154.
      
      llvm-svn: 244108
      23280472
  17. Jul 31, 2015
    • Duncan P. N. Exon Smith's avatar
      DI: Rewrite the DIBuilder local variable API · 1e40dc42
      Duncan P. N. Exon Smith authored
      Replace the general `createLocalVariable()` with two more specific
      functions: `createParameterVariable()` and `createAutoVariable()`, and
      rewrite the documentation.
      
      Besides cleaning up the API, this avoids exposing the fake DWARF tags
      `DW_TAG_arg_variable` and `DW_TAG_auto_variable` to frontends, and is
      preparation for removing them completely.
      
      llvm-svn: 243764
      1e40dc42
  18. Jul 27, 2015
    • JF Bastien's avatar
      Fix `llvm-config` to emit the linker flag for the combined shared object built... · ba70e9e1
      JF Bastien authored
      Fix `llvm-config` to emit the linker flag for the combined shared object built by autoconfig/make instead of the individual components.
      
      Summary:
      When LLVM is configured to build shared libraries, CMake builds each component as it's own shared object, while autoconfig/make builds them statically and then links them all together to create a single shared object. This change adds compile time config flags to `llvm-config` so it can know whether LLVM's components are separated or not and act accordingly.
      
      This fixes `llvm-config` instead of fixing the makefiles to behave like CMake because, AIUI, LLVM's autoconfig/make build system is on the way out anyway.
      
      This change only affects `llvm-config` from builds that use autoconfig/make.
      
      Reviewers: jfb
      
      Subscribers: echristo, dschuff, llvm-commits
      
      Differential Revision: http://reviews.llvm.org/D11392
      
      llvm-svn: 243297
      ba70e9e1
  19. Jul 16, 2015
    • Reid Kleckner's avatar
      Revert "Update LLVM bindings after r239940. ..." · ef9828fb
      Reid Kleckner authored
      Revert the changes to the C API LLVMBuildLandingPad that were part of
      the personality function move. We now set the personality on the parent
      function when the C API attempts to construct a landingpad with a
      personality.
      
      This reverts commit r240010.
      
      llvm-svn: 242372
      ef9828fb
  20. Jul 15, 2015
    • Andrew Wilkins's avatar
      Expose setPersonalityFn to Go · 02ee3efb
      Andrew Wilkins authored
      Summary:
      Add Value.SetPersonality to the Go bindings. The Go
      bindings' Builder.CreateLandingPad has been updated,
      removing the obsolete personality argument.
      
      Background
      
      The personality attribute was removed from LandingPadInst
      in r239940, and llvm::Function::setPersonalityFn introduced.
      
      There was no corresponding change to either the C API or
      Go bindings. The Go bindings were broken until r239940, but
      that change was just to ignore the personality argument.
      This broke llgo.
      
      Reviewers: majnemer, pcc
      
      Subscribers: deadalnix, llvm-commits, axw
      
      Differential Revision: http://reviews.llvm.org/D11116
      
      llvm-svn: 242289
      02ee3efb
  21. Jul 06, 2015
    • Rafael Espindola's avatar
      Remove getRelocationAddress. · 76ad2321
      Rafael Espindola authored
      Originally added in r139314.
      
      Back then it didn't actually get the address, it got whatever value the
      relocation used: address or offset.
      
      The values in different object formats are:
      
      * MachO: Always an offset.
      * COFF: Always an address, but when talking about the virtual address of
        sections it says: "for simplicity, compilers should set this to zero".
      * ELF: An offset for .o files and and address for .so files. In the case of the
        .so, the relocation in not linked to any section (sh_info is 0). We can't
        really compute an offset.
      
      Some API mappings would be:
      
      * Use getAddress for everything. It would be quite cumbersome. To compute the
        address elf has to follow sh_info, which can be corrupted and therefore the
        method has to return an ErrorOr. The address of the section is also the same
        for every relocation in a section, so we shouldn't have to check the error
        and fetch the value for every relocation.
      
      * Use a getValue and make it up to the user to know what it is getting.
      
      * Use a getOffset and:
       * Assert for dynamic ELF objects. That is a very peculiar case and it is
         probably fair to ask any tool that wants to support it to use ELF.h. The
         only tool we have that reads those (llvm-readobj) already does that. The
         only other use case I can think of is a dynamic linker.
       * Check that COFF .obj files have sections with zero virtual address spaces. If
         it turns out that some assembler/compiler produces these, we can change
         COFFObjectFile::getRelocationOffset to subtract it. Given COFF format,
         this can be done without the need for ErrorOr.
      
      The getRelocationAddress method was never implemented for COFF. It also
      had exactly one use in a very peculiar case: a shortcut for adding the
      section value to a pcrel reloc on MachO.
      
      Given that, I don't expect that there is any use out there of the C API. If
      that is not the case, let me know and I will add it back with the implementation
      inlined and do a proper deprecation.
      
      llvm-svn: 241450
      76ad2321
  22. Jun 27, 2015
    • Peter Zotov's avatar
      [OCaml] Bump ctypes dependency to 0.4. · 8c7e29d5
      Peter Zotov authored
      ctypes 0.3 and earlier contains an interface-definig bug:
      its ptr_of_raw_address accepts Int64 and not Nativeint. ctypes 0.4
      was not released during the 3.6 cycle, and because of that, LLVM 3.6
      was released with ctypes 0.3 as a dependency, which now breaks
      the build on modern ctypes.
      
      Unbreak.
      
      llvm-svn: 240882
      8c7e29d5
  23. Jun 18, 2015
  24. Jun 16, 2015
  25. Apr 29, 2015
    • Duncan P. N. Exon Smith's avatar
      IR: Give 'DI' prefix to debug info metadata · a9308c49
      Duncan P. N. Exon Smith authored
      Finish off PR23080 by renaming the debug info IR constructs from `MD*`
      to `DI*`.  The last of the `DIDescriptor` classes were deleted in
      r235356, and the last of the related typedefs removed in r235413, so
      this has all baked for about a week.
      
      Note: If you have out-of-tree code (like a frontend), I recommend that
      you get everything compiling and tests passing with the *previous*
      commit before updating to this one.  It'll be easier to keep track of
      what code is using the `DIDescriptor` hierarchy and what you've already
      updated, and I think you're extremely unlikely to insert bugs.  YMMV of
      course.
      
      Back to *this* commit: I did this using the rename-md-di-nodes.sh
      upgrade script I've attached to PR23080 (both code and testcases) and
      filtered through clang-format-diff.py.  I edited the tests for
      test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns
      were off-by-three.  It should work on your out-of-tree testcases (and
      code, if you've followed the advice in the previous paragraph).
      
      Some of the tests are in badly named files now (e.g.,
      test/Assembler/invalid-mdcompositetype-missing-tag.ll should be
      'dicompositetype'); I'll come back and move the files in a follow-up
      commit.
      
      llvm-svn: 236120
      a9308c49
  26. Apr 21, 2015
  27. Apr 20, 2015
    • Duncan P. N. Exon Smith's avatar
      DebugInfo: Delete old subclasses of DIType · c6246885
      Duncan P. N. Exon Smith authored
      Delete subclasses of (the already deleted) `DIType` in favour of
      directly using pointers from the `Metadata` hierarchy.
      
      While `DICompositeType` wraps `MDCompositeTypeBase` and `DIDerivedType`
      wraps `MDDerivedTypeBase`, most uses of each really meant the more
      specific `MDCompositeType` and `MDDerivedType`.
      
      llvm-svn: 235351
      c6246885
  28. Apr 16, 2015
    • Duncan P. N. Exon Smith's avatar
      DebugInfo: Remove DIDescriptor from the DIBuilder API · 02083539
      Duncan P. N. Exon Smith authored
      As a step toward killing `DIDescriptor` and its subclasses, remove it
      from the `DIBuilder` API.  Replace the subclasses with appropriate
      pointers from the new debug info hierarchy.  There are a couple of
      possible surprises in type choices for out-of-tree frontends:
      
        - Subroutine types: `MDSubroutineType`, not `MDCompositeTypeBase`.
        - Composite types: `MDCompositeType`, not `MDCompositeTypeBase`.
        - Scopes: `MDScope`, not `MDNode`.
        - Generic debug info nodes: `DebugNode`, not `MDNode`.
      
      This is part of PR23080.
      
      llvm-svn: 235111
      02083539
  29. Apr 15, 2015
    • Duncan P. N. Exon Smith's avatar
      DebugInfo: Require a DebugLoc in DIBuilder::insertDeclare() · cd1aecfe
      Duncan P. N. Exon Smith authored
      Change `DIBuilder::insertDeclare()` and `insertDbgValueIntrinsic()` to
      take an `MDLocation*`/`DebugLoc` parameter which it attaches to the
      created intrinsic.  Assert at creation time that the `scope:` field's
      subprogram matches the variable's.  There's a matching `clang` commit to
      use the API.
      
      The context for this is PR22778, which is removing the `inlinedAt:`
      field from `MDLocalVariable`, instead deferring to the `!dbg` location
      attached to the debug info intrinsic.  The best way to ensure we always
      have a `!dbg` attachment is to require one at creation time.  I'll be
      adding verifier checks next, but this API change is the best way to
      shake out frontend bugs.
      
      Note: I added an `llvm_unreachable()` in `bindings/go` and passed in
      `nullptr` for the `DebugLoc`.  The `llgo` folks will eventually need to
      pass a valid `DebugLoc` here.
      
      llvm-svn: 235041
      cd1aecfe
  30. Apr 08, 2015
    • Peter Collingbourne's avatar
      Go bindings: make various DIBuilder arguments optional. · 0b9c7bb9
      Peter Collingbourne authored
      r234262 changed some code in DIBuilderBindings.cpp to use the unwrap function
      to unwrap debug metadata. The problem with this is that unwrap asserts that
      its argument is non-null, which is not what we want in a number of places
      in DIBuilder where the argument is optional. This change makes certain
      arguments optional by adding null checks in places where it is required,
      fixing the llgo build.
      
      llvm-svn: 234428
      0b9c7bb9
  31. Apr 07, 2015
  32. Mar 05, 2015
  33. Mar 02, 2015
  34. Feb 13, 2015
    • Chandler Carruth's avatar
      [PM] Remove the old 'PassManager.h' header file at the top level of · 30d69c2e
      Chandler Carruth authored
      LLVM's include tree and the use of using declarations to hide the
      'legacy' namespace for the old pass manager.
      
      This undoes the primary modules-hostile change I made to keep
      out-of-tree targets building. I sent an email inquiring about whether
      this would be reasonable to do at this phase and people seemed fine with
      it, so making it a reality. This should allow us to start bootstrapping
      with modules to a certain extent along with making it easier to mix and
      match headers in general.
      
      The updates to any code for users of LLVM are very mechanical. Switch
      from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
      Qualify the types which now produce compile errors with "legacy::". The
      most common ones are "PassManager", "PassManagerBase", and
      "FunctionPassManager".
      
      llvm-svn: 229094
      30d69c2e
    • Chandler Carruth's avatar
      Re-sort the #include lines in bindings and examples which I managed to · 1f832f7c
      Chandler Carruth authored
      miss previously.
      
      llvm-svn: 229089
      1f832f7c
Loading