llvm-project/llvm/lib/IR
Peter Collingbourne e2dcf7c3a1 IR, Bitcode: Change bitcode reader to no longer own its memory buffer.
Unique ownership is just one possible ownership pattern for the memory buffer
underlying the bitcode reader. In practice, as this patch shows, ownership can
often reside at a higher level. With the upcoming change to allow multiple
modules in a single bitcode file, it will no longer be appropriate for
modules to generally have unique ownership of their memory buffer.

The C API exposes the ownership relation via the LLVMGetBitcodeModuleInContext
and LLVMGetBitcodeModuleInContext2 functions, so we still need some way for
the module to own the memory buffer. This patch does so by adding an owned
memory buffer field to Module, and using it in a few other places where it
is convenient.

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

llvm-svn: 286214
2016-11-08 06:03:43 +00:00
..
AsmWriter.cpp Add DWARF debug info support for C++11 inline namespaces. 2016-11-03 19:42:02 +00:00
AttributeImpl.h Kill deprecated attribute API 2016-11-06 07:48:46 +00:00
AttributeSetNode.h Add missing import to fix the build 2016-07-21 04:31:38 +00:00
Attributes.cpp Kill deprecated attribute API 2016-11-06 07:48:46 +00:00
AttributesCompatFunc.td Provide a way to specify inliner's attribute compatibility and merging. 2015-12-22 23:57:37 +00:00
AutoUpgrade.cpp Add a missing break statement. NFC. 2016-11-08 04:01:50 +00:00
BasicBlock.cpp Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC) 2016-09-17 06:00:02 +00:00
CMakeLists.txt Move ProfileSummary to IR. 2016-05-19 21:07:12 +00:00
Comdat.cpp [NFC] Remove some dead code: 2016-05-11 16:38:40 +00:00
ConstantFold.cpp [IR] Clang-format my previous commit. NFCI. 2016-10-28 01:41:56 +00:00
ConstantFold.h [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
ConstantRange.cpp Analysis: Move llvm::getConstantRangeFromMetadata to IR library. 2016-10-21 19:59:26 +00:00
Constants.cpp Use unique_ptr in LLVMContextImpl's constant maps. 2016-10-10 16:26:13 +00:00
ConstantsContext.h Increase SmallVector size for ConstantUniqueMap::getHashValue() (NFC) 2016-04-19 00:17:55 +00:00
Core.cpp Kill deprecated attribute API 2016-11-06 07:48:46 +00:00
DIBuilder.cpp Add DWARF debug info support for C++11 inline namespaces. 2016-11-03 19:42:02 +00:00
DataLayout.cpp [IR] Introduce a non-integral pointer type 2016-07-28 23:43:38 +00:00
DebugInfo.cpp Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
DebugInfoMetadata.cpp Add DWARF debug info support for C++11 inline namespaces. 2016-11-03 19:42:02 +00:00
DebugLoc.cpp [NFC] Header cleanup 2016-04-18 09:17:29 +00:00
DiagnosticInfo.cpp [OptDiag, opt-viewer] Save callee's location and display as link 2016-11-07 22:41:13 +00:00
DiagnosticPrinter.cpp
Dominators.cpp [GenericDomTree] Change GenericDomTree to use NodeRef in GraphTraits. NFC. 2016-08-17 20:01:58 +00:00
Function.cpp Expandload and Compressstore intrinsics 2016-11-03 03:23:55 +00:00
GCOV.cpp Support: Remove MemoryObject and DataStreamer interfaces. 2016-11-02 00:08:37 +00:00
GVMaterializer.cpp
Globals.cpp IR: Deduplicate getParent() functions on derived classes of GlobalValue into the base class. NFCI. 2016-10-25 02:54:08 +00:00
IRBuilder.cpp Add invariant start call creation in IRBuilder.NFC 2016-07-22 20:57:23 +00:00
IRPrintingPasses.cpp Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
InlineAsm.cpp Replace "fallthrough" comments with LLVM_FALLTHROUGH 2016-08-17 05:10:15 +00:00
Instruction.cpp fix documentation comments; NFC 2016-10-05 18:51:12 +00:00
Instructions.cpp Remove duplicated code; NFC 2016-10-02 00:09:57 +00:00
IntrinsicInst.cpp [Profile] code refactoring: make getStep a method in base class 2016-09-20 19:07:22 +00:00
LLVMBuild.txt
LLVMContext.cpp Use profile info to set function section prefix to group hot/cold functions. 2016-10-18 20:42:47 +00:00
LLVMContextImpl.cpp Use unique_ptr in LLVMContextImpl's constant maps. 2016-10-10 16:26:13 +00:00
LLVMContextImpl.h Add DWARF debug info support for C++11 inline namespaces. 2016-11-03 19:42:02 +00:00
LegacyPassManager.cpp Replace TimeValue by TimePoint in LegacyPassManager. NFC. 2016-10-25 16:20:07 +00:00
MDBuilder.cpp Use profile info to set function section prefix to group hot/cold functions. 2016-10-18 20:42:47 +00:00
Mangler.cpp Remove the default constructor and count variable from the Mangler since 2016-09-29 02:03:50 +00:00
Metadata.cpp Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
MetadataImpl.h
Module.cpp IR, Bitcode: Change bitcode reader to no longer own its memory buffer. 2016-11-08 06:03:43 +00:00
ModuleSummaryIndex.cpp ThinLTO: handles modules with empty summaries 2016-10-08 04:44:18 +00:00
Operator.cpp [opaque pointer types] [NFC] GEP: replace get(Pointer)ElementType uses with get{Source,Result}ElementType. 2016-01-19 17:28:00 +00:00
OptBisect.cpp Removing unused function. 2016-04-22 22:24:20 +00:00
Pass.cpp Use StringRef in Pass Info/Support API (NFC) 2016-10-01 04:03:30 +00:00
PassManager.cpp [PM] Introduce an abstraction for all the analyses over a particular IR 2016-08-20 04:57:28 +00:00
PassRegistry.cpp Use the range variant of find instead of unpacking begin/end 2016-08-11 22:21:41 +00:00
ProfileSummary.cpp Reapply r271728 after adding move cobstructor for ProfileSummaryInfo 2016-06-03 22:54:26 +00:00
Statepoint.cpp Introduce an GCRelocateInst class [NFC] 2016-04-12 18:05:10 +00:00
SymbolTableListTraitsImpl.h ADT: Remove external uses of ilist_iterator, NFC 2016-09-03 01:22:56 +00:00
Type.cpp IR: Remove a no longer needed assert. 2016-10-29 20:57:12 +00:00
TypeFinder.cpp Apply clang-tidy's modernize-loop-convert to most of lib/IR. 2016-06-26 14:10:56 +00:00
Use.cpp
User.cpp Retire llvm::alignOf in favor of C++11 alignof. 2016-10-20 15:02:18 +00:00
Value.cpp Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC) 2016-09-17 06:00:02 +00:00
ValueSymbolTable.cpp Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes. 2016-08-23 17:14:32 +00:00
ValueTypes.cpp getVectorElementType().getSizeInBits() -> getScalarSizeInBits() ; NFCI 2016-09-14 16:37:15 +00:00
Verifier.cpp DebugInfo: make DW_TAG_atomic_type valid 2016-10-31 19:09:38 +00:00