Loading llvm/docs/ReleaseNotes.rst +8 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,14 @@ Non-comprehensive list of changes in this release a pointer to make it explicit. The Module owns the datalayout and it has to match the one attached to the TargetMachine for generating code. In 3.6, a pass was inserted in the pipeline to make the DataLayout accessible: MyPassManager->add(new DataLayoutPass(MyTargetMachine->getDataLayout())); In 3.7, you don't need a pass, you set the DataLayout on the Module: MyModule->setDataLayout(MyTargetMachine->createDataLayout()); The LLVM C API `LLVMGetTargetMachineData` is deprecated to reflect the fact that it won't be available anymore from TargetMachine in 3.8. * Comdats are now ortogonal to the linkage. LLVM will not create comdats for weak linkage globals and the frontends are responsible for explicitly adding them. Loading llvm/include/llvm-c/TargetMachine.h +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ char *LLVMGetTargetMachineCPU(LLVMTargetMachineRef T); LLVMDisposeMessage. */ char *LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T); /** Returns the llvm::DataLayout used for this llvm:TargetMachine. */ /** Deprecated: use LLVMGetDataLayout(LLVMModuleRef M) instead. */ LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T); /** Set the target machine's ASM verbosity. */ Loading llvm/include/llvm/Target/TargetMachine.h +5 −0 Original line number Diff line number Diff line Loading @@ -125,10 +125,15 @@ public: return *static_cast<const STC*>(getSubtargetImpl(F)); } /// Deprecated in 3.7, will be removed in 3.8. Use createDataLayout() instead. /// /// This method returns a pointer to the DataLayout for the target. It should /// be unchanging for every subtarget. const DataLayout *getDataLayout() const { return &DL; } /// Create a DataLayout. const DataLayout createDataLayout() const { return DL; } /// \brief Reset the target options based on the function's attributes. // FIXME: Remove TargetOptions that affect per-function code generation // from TargetMachine. Loading Loading
llvm/docs/ReleaseNotes.rst +8 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,14 @@ Non-comprehensive list of changes in this release a pointer to make it explicit. The Module owns the datalayout and it has to match the one attached to the TargetMachine for generating code. In 3.6, a pass was inserted in the pipeline to make the DataLayout accessible: MyPassManager->add(new DataLayoutPass(MyTargetMachine->getDataLayout())); In 3.7, you don't need a pass, you set the DataLayout on the Module: MyModule->setDataLayout(MyTargetMachine->createDataLayout()); The LLVM C API `LLVMGetTargetMachineData` is deprecated to reflect the fact that it won't be available anymore from TargetMachine in 3.8. * Comdats are now ortogonal to the linkage. LLVM will not create comdats for weak linkage globals and the frontends are responsible for explicitly adding them. Loading
llvm/include/llvm-c/TargetMachine.h +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ char *LLVMGetTargetMachineCPU(LLVMTargetMachineRef T); LLVMDisposeMessage. */ char *LLVMGetTargetMachineFeatureString(LLVMTargetMachineRef T); /** Returns the llvm::DataLayout used for this llvm:TargetMachine. */ /** Deprecated: use LLVMGetDataLayout(LLVMModuleRef M) instead. */ LLVMTargetDataRef LLVMGetTargetMachineData(LLVMTargetMachineRef T); /** Set the target machine's ASM verbosity. */ Loading
llvm/include/llvm/Target/TargetMachine.h +5 −0 Original line number Diff line number Diff line Loading @@ -125,10 +125,15 @@ public: return *static_cast<const STC*>(getSubtargetImpl(F)); } /// Deprecated in 3.7, will be removed in 3.8. Use createDataLayout() instead. /// /// This method returns a pointer to the DataLayout for the target. It should /// be unchanging for every subtarget. const DataLayout *getDataLayout() const { return &DL; } /// Create a DataLayout. const DataLayout createDataLayout() const { return DL; } /// \brief Reset the target options based on the function's attributes. // FIXME: Remove TargetOptions that affect per-function code generation // from TargetMachine. Loading