~ubuntu-branches/ubuntu/trusty/llvm-toolchain-snapshot/trusty-201310232150

« back to all changes in this revision

Viewing changes to lib/ExecutionEngine/JIT/JITMemoryManager.cpp

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2013-05-27 15:01:57 UTC
  • mfrom: (0.10.1) (0.9.1) (0.8.1) (0.7.1) (0.6.1) (0.5.2)
  • Revision ID: package-import@ubuntu.com-20130527150157-tdkrsjpuvht7v0qx
Tags: 1:3.4~svn182733-1~exp1
* New snapshot release (3.4 release)
* Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
    to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
  * Various packages rename to allow co installations:
    * libclang1 => libclang1-3.4
    * libclang1-dbg => libclang1-3.4-dbg
    * libclang-dev => libclang-3.4-dev
    * libclang-common-dev => libclang-common-3.4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
509
509
      return (uint8_t*)DataAllocator.Allocate(Size, Alignment);
510
510
    }
511
511
 
512
 
    bool applyPermissions(std::string *ErrMsg) {
 
512
    bool finalizeMemory(std::string *ErrMsg) {
513
513
      return false;
514
514
    }
515
515
 
516
 
    /// startExceptionTable - Use startFunctionBody to allocate memory for the
517
 
    /// function's exception table.
518
 
    uint8_t* startExceptionTable(const Function* F, uintptr_t &ActualSize) {
519
 
      return startFunctionBody(F, ActualSize);
520
 
    }
521
 
 
522
 
    /// endExceptionTable - The exception table of F is now allocated,
523
 
    /// and takes the memory in the range [TableStart,TableEnd).
524
 
    void endExceptionTable(const Function *F, uint8_t *TableStart,
525
 
                           uint8_t *TableEnd, uint8_t* FrameRegister) {
526
 
      assert(TableEnd > TableStart);
527
 
      assert(TableStart == (uint8_t *)(CurBlock+1) &&
528
 
             "Mismatched table start/end!");
529
 
 
530
 
      uintptr_t BlockSize = TableEnd - (uint8_t *)CurBlock;
531
 
 
532
 
      // Release the memory at the end of this block that isn't needed.
533
 
      FreeMemoryList =CurBlock->TrimAllocationToSize(FreeMemoryList, BlockSize);
534
 
    }
535
 
 
536
516
    uint8_t *getGOTBase() const {
537
517
      return GOTBase;
538
518
    }
557
537
      if (Body) deallocateBlock(Body);
558
538
    }
559
539
 
560
 
    /// deallocateExceptionTable - Deallocate memory for the specified
561
 
    /// exception table.
562
 
    void deallocateExceptionTable(void *ET) {
563
 
      if (ET) deallocateBlock(ET);
564
 
    }
565
 
 
566
540
    /// setMemoryWritable - When code generation is in progress,
567
541
    /// the code pages may need permissions changed.
568
542
    void setMemoryWritable()