LLVM
8.0.1
|
#include "llvm/Bitcode/BitcodeReader.h"
#include "MetadataLoader.h"
#include "ValueList.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Bitcode/BitstreamReader.h"
#include "llvm/Bitcode/LLVMBitCodes.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Argument.h"
#include "llvm/IR/Attributes.h"
#include "llvm/IR/AutoUpgrade.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CallSite.h"
#include "llvm/IR/CallingConv.h"
#include "llvm/IR/Comdat.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfo.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GVMaterializer.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalIFunc.h"
#include "llvm/IR/GlobalIndirectSymbol.h"
#include "llvm/IR/GlobalObject.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSummaryIndex.h"
#include "llvm/IR/Operator.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Support/AtomicOrdering.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <deque>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <system_error>
#include <tuple>
#include <utility>
#include <vector>
Go to the source code of this file.
Enumerations | |
enum | |
Variables | |
static cl::opt< bool > | PrintSummaryGUIDs ("print-summary-global-ids", cl::init(false), cl::Hidden, cl::desc("Print the global id for each value when reading the module summary")) |
static ManagedStatic< BitcodeErrorCategoryType > | ErrorCategory |
anonymous enum |
Definition at line 98 of file BitcodeReader.cpp.
|
static |
Definition at line 1207 of file BitcodeReader.cpp.
References llvm::AttrBuilder::addAlignmentAttr(), llvm::AttrBuilder::addAttribute(), llvm::AttrBuilder::addStackAlignmentAttr(), llvm::Attribute::Alignment, llvm::Attribute::AllocSize, llvm::Attribute::ArgMemOnly, llvm::Attribute::Dereferenceable, llvm::Attribute::DereferenceableOrNull, llvm::Attribute::EndAttrKinds, getRawAttributeMask(), I, llvm::Attribute::None, and llvm::Attribute::StackAlignment.
Referenced by decodeLLVMAttributesForBitcode().
|
static |
Convert a string from a record into an std::string, return true on failure.
Definition at line 145 of file BitcodeReader.cpp.
References llvm::ArrayRef< T >::size().
Referenced by hasObjCCategoryInModule(), readIdentificationBlock(), readModuleTriple(), and setImmutableRefs().
|
static |
This fills an AttrBuilder object with the LLVM attributes that have been decoded from the given integer.
This function must stay in sync with 'encodeLLVMAttributesForBitcode'.
Definition at line 1231 of file BitcodeReader.cpp.
References llvm::AttrBuilder::addAlignmentAttr(), addRawAttributeValue(), llvm::BitstreamCursor::advanceSkippingSubblocks(), assert(), llvm::AMDGPU::HSAMD::Kernel::Key::Attrs, B, llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::AttributeList::get(), llvm::BitstreamEntry::ID, llvm::isPowerOf2_32(), llvm::BitstreamEntry::Kind, llvm::bitc::PARAMATTR_BLOCK_ID, llvm::bitc::PARAMATTR_CODE_ENTRY, llvm::bitc::PARAMATTR_CODE_ENTRY_OLD, llvm::SmallVectorTemplateBase< T >::push_back(), llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::SmallVectorBase::size(), llvm::BitstreamEntry::SubBlock, and llvm::Error::success().
Definition at line 104 of file BitcodeReader.cpp.
References llvm::CorruptedBitcode, and llvm::make_error_code().
Referenced by decodeLLVMAttributesForBitcode(), getAttrFromCode(), llvm::getBitcodeFileContents(), getEnableSplitLTOUnitFlag(), llvm::BitcodeModule::getLTOInfo(), getSingleModule(), hasObjCCategory(), hasObjCCategoryInModule(), inferDSOLocal(), initStream(), jumpToValueSymbolTable(), readBlobInRecord(), readIdentificationBlock(), readIdentificationCode(), readModuleTriple(), readTriple(), readWideAPInt(), and setImmutableRefs().
|
static |
Definition at line 1304 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::Attribute::Alignment, llvm::Attribute::AllocSize, llvm::Attribute::AlwaysInline, llvm::Attribute::ArgMemOnly, llvm::bitc::ATTR_KIND_ALIGNMENT, llvm::bitc::ATTR_KIND_ALLOC_SIZE, llvm::bitc::ATTR_KIND_ALWAYS_INLINE, llvm::bitc::ATTR_KIND_ARGMEMONLY, llvm::bitc::ATTR_KIND_BUILTIN, llvm::bitc::ATTR_KIND_BY_VAL, llvm::bitc::ATTR_KIND_COLD, llvm::bitc::ATTR_KIND_CONVERGENT, llvm::bitc::ATTR_KIND_DEREFERENCEABLE, llvm::bitc::ATTR_KIND_DEREFERENCEABLE_OR_NULL, llvm::bitc::ATTR_KIND_IN_ALLOCA, llvm::bitc::ATTR_KIND_IN_REG, llvm::bitc::ATTR_KIND_INACCESSIBLEMEM_ONLY, llvm::bitc::ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY, llvm::bitc::ATTR_KIND_INLINE_HINT, llvm::bitc::ATTR_KIND_JUMP_TABLE, llvm::bitc::ATTR_KIND_MIN_SIZE, llvm::bitc::ATTR_KIND_NAKED, llvm::bitc::ATTR_KIND_NEST, llvm::bitc::ATTR_KIND_NO_ALIAS, llvm::bitc::ATTR_KIND_NO_BUILTIN, llvm::bitc::ATTR_KIND_NO_CAPTURE, llvm::bitc::ATTR_KIND_NO_DUPLICATE, llvm::bitc::ATTR_KIND_NO_IMPLICIT_FLOAT, llvm::bitc::ATTR_KIND_NO_INLINE, llvm::bitc::ATTR_KIND_NO_RECURSE, llvm::bitc::ATTR_KIND_NO_RED_ZONE, llvm::bitc::ATTR_KIND_NO_RETURN, llvm::bitc::ATTR_KIND_NO_UNWIND, llvm::bitc::ATTR_KIND_NOCF_CHECK, llvm::bitc::ATTR_KIND_NON_LAZY_BIND, llvm::bitc::ATTR_KIND_NON_NULL, llvm::bitc::ATTR_KIND_OPT_FOR_FUZZING, llvm::bitc::ATTR_KIND_OPTIMIZE_FOR_SIZE, llvm::bitc::ATTR_KIND_OPTIMIZE_NONE, llvm::bitc::ATTR_KIND_READ_NONE, llvm::bitc::ATTR_KIND_READ_ONLY, llvm::bitc::ATTR_KIND_RETURNED, llvm::bitc::ATTR_KIND_RETURNS_TWICE, llvm::bitc::ATTR_KIND_S_EXT, llvm::bitc::ATTR_KIND_SAFESTACK, llvm::bitc::ATTR_KIND_SANITIZE_ADDRESS, llvm::bitc::ATTR_KIND_SANITIZE_HWADDRESS, llvm::bitc::ATTR_KIND_SANITIZE_MEMORY, llvm::bitc::ATTR_KIND_SANITIZE_THREAD, llvm::bitc::ATTR_KIND_SHADOWCALLSTACK, llvm::bitc::ATTR_KIND_SPECULATABLE, llvm::bitc::ATTR_KIND_SPECULATIVE_LOAD_HARDENING, llvm::bitc::ATTR_KIND_STACK_ALIGNMENT, llvm::bitc::ATTR_KIND_STACK_PROTECT, llvm::bitc::ATTR_KIND_STACK_PROTECT_REQ, llvm::bitc::ATTR_KIND_STACK_PROTECT_STRONG, llvm::bitc::ATTR_KIND_STRICT_FP, llvm::bitc::ATTR_KIND_STRUCT_RET, llvm::bitc::ATTR_KIND_SWIFT_ERROR, llvm::bitc::ATTR_KIND_SWIFT_SELF, llvm::bitc::ATTR_KIND_UW_TABLE, llvm::bitc::ATTR_KIND_WRITEONLY, llvm::bitc::ATTR_KIND_Z_EXT, B, llvm::Attribute::Builtin, llvm::Attribute::ByVal, llvm::SmallVectorImpl< T >::clear(), llvm::Attribute::Cold, llvm::Attribute::Convergent, llvm::Attribute::Dereferenceable, llvm::Attribute::DereferenceableOrNull, llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::Exponent, llvm::BitstreamEntry::ID, llvm::Attribute::InaccessibleMemOnly, llvm::Attribute::InaccessibleMemOrArgMemOnly, llvm::Attribute::InAlloca, llvm::Attribute::InlineHint, llvm::Attribute::InReg, llvm::Attribute::JumpTable, llvm::BitstreamEntry::Kind, Kind, llvm::Value::MaxAlignmentExponent, llvm::Attribute::MinSize, llvm::Attribute::Naked, llvm::Attribute::Nest, llvm::Attribute::NoAlias, llvm::Attribute::NoBuiltin, llvm::Attribute::NoCapture, llvm::Attribute::NoCfCheck, llvm::Attribute::NoDuplicate, llvm::Attribute::NoImplicitFloat, llvm::Attribute::NoInline, llvm::Attribute::None, llvm::Attribute::NonLazyBind, llvm::Attribute::NonNull, llvm::Attribute::NoRecurse, llvm::Attribute::NoRedZone, llvm::Attribute::NoReturn, llvm::Attribute::NoUnwind, llvm::Attribute::OptForFuzzing, llvm::Attribute::OptimizeForSize, llvm::Attribute::OptimizeNone, llvm::bitc::PARAMATTR_GROUP_BLOCK_ID, llvm::bitc::PARAMATTR_GRP_CODE_ENTRY, parseAttrKind(), llvm::Attribute::ReadNone, llvm::Attribute::ReadOnly, llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::Attribute::Returned, llvm::Attribute::ReturnsTwice, llvm::Attribute::SafeStack, llvm::Attribute::SanitizeAddress, llvm::Attribute::SanitizeHWAddress, llvm::Attribute::SanitizeMemory, llvm::Attribute::SanitizeThread, llvm::Attribute::SExt, llvm::Attribute::ShadowCallStack, llvm::SmallVectorBase::size(), llvm::Attribute::Speculatable, llvm::Attribute::SpeculativeLoadHardening, llvm::Attribute::StackAlignment, llvm::Attribute::StackProtect, llvm::Attribute::StackProtectReq, llvm::Attribute::StackProtectStrong, llvm::Attribute::StrictFP, llvm::Attribute::StructRet, llvm::BitstreamEntry::SubBlock, llvm::Error::success(), llvm::Attribute::SwiftError, llvm::Attribute::SwiftSelf, llvm::Attribute::UWTable, llvm::Attribute::WriteOnly, and llvm::Attribute::ZExt.
Definition at line 986 of file BitcodeReader.cpp.
References llvm::MCID::Add, llvm::bitc::BINOP_ADD, llvm::bitc::BINOP_AND, llvm::bitc::BINOP_ASHR, llvm::bitc::BINOP_LSHR, llvm::bitc::BINOP_MUL, llvm::bitc::BINOP_OR, llvm::bitc::BINOP_SDIV, llvm::bitc::BINOP_SHL, llvm::bitc::BINOP_SREM, llvm::bitc::BINOP_SUB, llvm::bitc::BINOP_UDIV, llvm::bitc::BINOP_UREM, llvm::bitc::BINOP_XOR, llvm::Type::isFPOrFPVectorTy(), and llvm::Type::isIntOrIntVectorTy().
Referenced by readWideAPInt().
|
static |
Definition at line 953 of file BitcodeReader.cpp.
References llvm::bitc::CAST_ADDRSPACECAST, llvm::bitc::CAST_BITCAST, llvm::bitc::CAST_FPEXT, llvm::bitc::CAST_FPTOSI, llvm::bitc::CAST_FPTOUI, llvm::bitc::CAST_FPTRUNC, llvm::bitc::CAST_INTTOPTR, llvm::bitc::CAST_PTRTOINT, llvm::bitc::CAST_SEXT, llvm::bitc::CAST_SITOFP, llvm::bitc::CAST_TRUNC, llvm::bitc::CAST_UITOFP, and llvm::bitc::CAST_ZEXT.
Referenced by readWideAPInt().
|
static |
Definition at line 1054 of file BitcodeReader.cpp.
References llvm::Comdat::Any, llvm::bitc::COMDAT_SELECTION_KIND_ANY, llvm::bitc::COMDAT_SELECTION_KIND_EXACT_MATCH, llvm::bitc::COMDAT_SELECTION_KIND_LARGEST, llvm::bitc::COMDAT_SELECTION_KIND_NO_DUPLICATES, llvm::bitc::COMDAT_SELECTION_KIND_SAME_SIZE, llvm::Comdat::ExactMatch, llvm::Comdat::Largest, llvm::Comdat::NoDuplicates, and llvm::Comdat::SameSize.
|
static |
Definition at line 916 of file BitcodeReader.cpp.
References llvm::GlobalValue::DefaultStorageClass, llvm::GlobalValue::DLLExportStorageClass, and llvm::GlobalValue::DLLImportStorageClass.
Definition at line 925 of file BitcodeReader.cpp.
|
static |
Definition at line 1070 of file BitcodeReader.cpp.
References llvm::bitc::AllowContract, llvm::bitc::AllowReassoc, llvm::bitc::AllowReciprocal, llvm::bitc::ApproxFunc, llvm::bitc::NoInfs, llvm::bitc::NoNaNs, llvm::bitc::NoSignedZeros, llvm::FastMathFlags::setAllowContract(), llvm::FastMathFlags::setAllowReassoc(), llvm::FastMathFlags::setAllowReciprocal(), llvm::FastMathFlags::setApproxFunc(), llvm::FastMathFlags::setFast(), llvm::FastMathFlags::setNoInfs(), llvm::FastMathFlags::setNoNaNs(), llvm::FastMathFlags::setNoSignedZeros(), and llvm::bitc::UnsafeAlgebra.
|
static |
Definition at line 873 of file BitcodeReader.cpp.
References llvm::FunctionSummary::FFlags::NoInline, llvm::FunctionSummary::FFlags::NoRecurse, llvm::FunctionSummary::FFlags::ReadNone, llvm::FunctionSummary::FFlags::ReadOnly, and llvm::FunctionSummary::FFlags::ReturnDoesNotAlias.
Referenced by setImmutableRefs().
|
static |
Definition at line 902 of file BitcodeReader.cpp.
Referenced by setImmutableRefs().
|
static |
Decode the flags for GlobalValue in the summary.
Definition at line 884 of file BitcodeReader.cpp.
Referenced by setImmutableRefs().
|
static |
Definition at line 831 of file BitcodeReader.cpp.
References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::AvailableExternallyLinkage, llvm::GlobalValue::CommonLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::GlobalValue::InternalLinkage, llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
Referenced by inferDSOLocal().
|
static |
Definition at line 1041 of file BitcodeReader.cpp.
References llvm::Acquire, llvm::AcquireRelease, llvm::Monotonic, llvm::NotAtomic, llvm::bitc::ORDERING_ACQREL, llvm::bitc::ORDERING_ACQUIRE, llvm::bitc::ORDERING_MONOTONIC, llvm::bitc::ORDERING_NOTATOMIC, llvm::bitc::ORDERING_RELEASE, llvm::bitc::ORDERING_SEQCST, llvm::bitc::ORDERING_UNORDERED, llvm::Release, llvm::SequentiallyConsistent, and llvm::Unordered.
|
static |
Definition at line 1024 of file BitcodeReader.cpp.
References llvm::AtomicRMWInst::Add, llvm::AtomicRMWInst::And, llvm::AtomicRMWInst::BAD_BINOP, llvm::AtomicRMWInst::Max, llvm::AtomicRMWInst::Min, llvm::AtomicRMWInst::Nand, llvm::AtomicRMWInst::Or, llvm::bitc::RMW_ADD, llvm::bitc::RMW_AND, llvm::bitc::RMW_MAX, llvm::bitc::RMW_MIN, llvm::bitc::RMW_NAND, llvm::bitc::RMW_OR, llvm::bitc::RMW_SUB, llvm::bitc::RMW_UMAX, llvm::bitc::RMW_UMIN, llvm::bitc::RMW_XCHG, llvm::bitc::RMW_XOR, llvm::AtomicRMWInst::Sub, llvm::AtomicRMWInst::UMax, llvm::AtomicRMWInst::UMin, llvm::AtomicRMWInst::Xchg, and llvm::AtomicRMWInst::Xor.
|
static |
Definition at line 933 of file BitcodeReader.cpp.
References llvm::GlobalValue::GeneralDynamicTLSModel, llvm::GlobalValue::InitialExecTLSModel, llvm::GlobalValue::LocalDynamicTLSModel, llvm::GlobalValue::LocalExecTLSModel, and llvm::GlobalValue::NotThreadLocal.
Definition at line 972 of file BitcodeReader.cpp.
References llvm::Type::isFPOrFPVectorTy(), llvm::Type::isIntOrIntVectorTy(), and llvm::bitc::UNOP_NEG.
Referenced by readWideAPInt().
|
static |
Definition at line 944 of file BitcodeReader.cpp.
References llvm::GlobalValue::Global, llvm::GlobalValue::Local, and llvm::GlobalValue::None.
|
static |
Definition at line 906 of file BitcodeReader.cpp.
References llvm::GlobalValue::DefaultVisibility, llvm::GlobalValue::HiddenVisibility, and llvm::GlobalValue::ProtectedVisibility.
|
static |
Definition at line 5932 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advanceSkippingSubblocks(), assert(), llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::bitc::FS_FLAGS, llvm::BitstreamEntry::ID, llvm::BitstreamEntry::Kind, llvm_unreachable, llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, and llvm::BitstreamEntry::SubBlock.
Referenced by llvm::BitcodeModule::getLTOInfo().
|
static |
Definition at line 1128 of file BitcodeReader.cpp.
References llvm::Attribute::Alignment, llvm::Attribute::AllocSize, llvm::Attribute::AlwaysInline, llvm::Attribute::ArgMemOnly, llvm::Attribute::Builtin, llvm::Attribute::ByVal, llvm::Attribute::Cold, llvm::Attribute::Convergent, llvm::Attribute::Dereferenceable, llvm::Attribute::DereferenceableOrNull, llvm::Attribute::EndAttrKinds, llvm::Attribute::InaccessibleMemOnly, llvm::Attribute::InaccessibleMemOrArgMemOnly, llvm::Attribute::InAlloca, llvm::Attribute::InlineHint, llvm::Attribute::InReg, llvm::Attribute::JumpTable, llvm_unreachable, llvm::Attribute::MinSize, llvm::Attribute::Naked, llvm::Attribute::Nest, llvm::Attribute::NoAlias, llvm::Attribute::NoBuiltin, llvm::Attribute::NoCapture, llvm::Attribute::NoCfCheck, llvm::Attribute::NoDuplicate, llvm::Attribute::NoImplicitFloat, llvm::Attribute::NoInline, llvm::Attribute::None, llvm::Attribute::NonLazyBind, llvm::Attribute::NonNull, llvm::Attribute::NoRecurse, llvm::Attribute::NoRedZone, llvm::Attribute::NoReturn, llvm::Attribute::NoUnwind, llvm::Attribute::OptForFuzzing, llvm::Attribute::OptimizeForSize, llvm::Attribute::OptimizeNone, llvm::Attribute::ReadNone, llvm::Attribute::ReadOnly, llvm::Attribute::Returned, llvm::Attribute::ReturnsTwice, llvm::Attribute::SafeStack, llvm::Attribute::SanitizeAddress, llvm::Attribute::SanitizeHWAddress, llvm::Attribute::SanitizeMemory, llvm::Attribute::SanitizeThread, llvm::Attribute::SExt, llvm::Attribute::ShadowCallStack, llvm::Attribute::Speculatable, llvm::Attribute::SpeculativeLoadHardening, llvm::Attribute::StackAlignment, llvm::Attribute::StackProtect, llvm::Attribute::StackProtectReq, llvm::Attribute::StackProtectStrong, llvm::Attribute::StrictFP, llvm::Attribute::StructRet, llvm::Attribute::SwiftError, llvm::Attribute::SwiftSelf, llvm::Attribute::UWTable, llvm::Attribute::WriteOnly, and llvm::Attribute::ZExt.
Referenced by addRawAttributeValue().
|
static |
Definition at line 6021 of file BitcodeReader.cpp.
References error(), llvm::getBitcodeModuleList(), and llvm::Expected< T >::takeError().
Referenced by llvm::getBitcodeLTOInfo(), llvm::getLazyBitcodeModule(), llvm::getModuleSummaryIndex(), llvm::parseBitcodeFile(), and llvm::readModuleSummaryIndex().
|
static |
Definition at line 819 of file BitcodeReader.cpp.
|
static |
Definition at line 280 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), llvm::BitstreamEntry::EndBlock, error(), llvm::BitstreamEntry::Error, hasObjCCategoryInModule(), llvm::BitstreamEntry::ID, llvm::BitstreamEntry::Kind, llvm::bitc::MODULE_BLOCK_ID, llvm::BitstreamEntry::Record, llvm::BitstreamCursor::SkipBlock(), llvm::BitstreamCursor::skipRecord(), and llvm::BitstreamEntry::SubBlock.
Referenced by llvm::isBitcodeContainingObjCCategory().
|
static |
Definition at line 239 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::SmallVectorImpl< T >::clear(), convertToString(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::BitstreamEntry::ID, llvm::BitstreamEntry::Kind, llvm_unreachable, llvm::bitc::MODULE_BLOCK_ID, llvm::bitc::MODULE_CODE_SECTIONNAME, llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, and llvm::BitstreamEntry::SubBlock.
Referenced by hasObjCCategory().
|
static |
Helper to read the header common to all bitcode files.
Definition at line 110 of file BitcodeReader.cpp.
References llvm::SimpleBitstreamCursor::canSkipToPos(), and llvm::SimpleBitstreamCursor::Read().
Referenced by initStream().
|
static |
Definition at line 2871 of file BitcodeReader.cpp.
References error(), getDecodedLinkage(), llvm::GlobalValue::hasDefaultVisibility(), llvm::GlobalValue::hasExternalWeakLinkage(), llvm::GlobalValue::hasLocalLinkage(), isConstant(), llvm::Type::isPointerTy(), Name, llvm::GlobalValue::setDSOLocal(), and llvm::ArrayRef< T >::size().
|
static |
Definition at line 123 of file BitcodeReader.cpp.
References error(), llvm::MemoryBufferRef::getBufferSize(), llvm::MemoryBufferRef::getBufferStart(), hasValidBitcodeHeader(), llvm::isBitcodeWrapper(), and llvm::SkipBitcodeWrapperHeader().
Referenced by llvm::getBitcodeFileContents(), llvm::getBitcodeProducerString(), llvm::getBitcodeTargetTriple(), and llvm::isBitcodeContainingObjCCategory().
|
static |
Helper to note and return the current location, and jump to the given offset.
Definition at line 1880 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), llvm::BitstreamCursor::advanceSkippingSubblocks(), assert(), llvm::bitc::BlockIDWidth, llvm::SmallVectorImpl< T >::clear(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, F(), llvm::BitstreamCursor::getAbbrevIDWidth(), llvm::SimpleBitstreamCursor::GetCurrentBitNo(), llvm::BitstreamEntry::ID, llvm::SimpleBitstreamCursor::JumpToBit(), llvm::BitstreamEntry::Kind, llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::BitstreamEntry::SubBlock, llvm::Error::success(), llvm::bitc::VALUE_SYMTAB_BLOCK_ID, and llvm::bitc::VST_CODE_FNENTRY.
|
static |
Definition at line 5208 of file BitcodeReader.cpp.
References llvm::TypeTestResolution::AlignLog2, llvm::TypeTestResolution::BitMask, llvm::StringRef::data(), llvm::ModuleSummaryIndex::getOrInsertTypeIdSummary(), llvm::TypeTestResolution::InlineBits, parseWholeProgramDevirtResolution(), llvm::ArrayRef< T >::size(), llvm::TypeTestResolution::SizeM1, llvm::TypeTestResolution::SizeM1BitWidth, llvm::TypeTestResolution::TheKind, and llvm::TypeIdSummary::TTRes.
Referenced by setImmutableRefs().
|
static |
Definition at line 5192 of file BitcodeReader.cpp.
References llvm::StringRef::data(), I, parseWholeProgramDevirtResolutionByArg(), llvm::WholeProgramDevirtResolution::SingleImplName, llvm::WholeProgramDevirtResolution::TheKind, and llvm::TypeIdSummary::WPDRes.
Referenced by parseTypeIdSummaryRecord().
|
static |
Definition at line 5178 of file BitcodeReader.cpp.
References B, llvm::ArrayRef< T >::begin(), llvm::WholeProgramDevirtResolution::ByArg::Bit, llvm::WholeProgramDevirtResolution::ByArg::Byte, llvm::WholeProgramDevirtResolution::ByArg::Info, llvm::WholeProgramDevirtResolution::ResByArg, and llvm::WholeProgramDevirtResolution::ByArg::TheKind.
Referenced by parseWholeProgramDevirtResolution().
|
static |
Definition at line 5708 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::BitstreamEntry::ID, llvm::BitstreamEntry::Kind, llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::BitstreamCursor::SkipBlock(), and llvm::BitstreamEntry::SubBlock.
Referenced by llvm::getBitcodeFileContents().
|
static |
Read the "IDENTIFICATION_BLOCK_ID" block, do some basic enforcement on the "epoch" encoded in the bitcode, and return the producer name if any.
Definition at line 167 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), llvm::bitc::BITCODE_CURRENT_EPOCH, llvm::SmallVectorImpl< T >::clear(), convertToString(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::BitstreamEntry::ID, llvm::bitc::IDENTIFICATION_BLOCK_ID, llvm::bitc::IDENTIFICATION_CODE_EPOCH, llvm::bitc::IDENTIFICATION_CODE_STRING, llvm::BitstreamEntry::Kind, llvm::BitstreamCursor::readRecord(), and llvm::BitstreamEntry::Record.
Referenced by llvm::getBitcodeFileContents(), and readIdentificationCode().
|
static |
Definition at line 211 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), llvm::SimpleBitstreamCursor::AtEndOfStream(), llvm::BitstreamEntry::EndBlock, error(), llvm::BitstreamEntry::Error, llvm::BitstreamEntry::ID, llvm::bitc::IDENTIFICATION_BLOCK_ID, llvm::BitstreamEntry::Kind, readIdentificationBlock(), llvm::BitstreamEntry::Record, llvm::BitstreamCursor::SkipBlock(), llvm::BitstreamCursor::skipRecord(), and llvm::BitstreamEntry::SubBlock.
Referenced by llvm::getBitcodeProducerString().
|
static |
Definition at line 308 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::SmallVectorImpl< T >::clear(), convertToString(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::BitstreamEntry::ID, llvm::BitstreamEntry::Kind, llvm_unreachable, llvm::bitc::MODULE_BLOCK_ID, llvm::bitc::MODULE_CODE_TRIPLE, llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, and llvm::BitstreamEntry::SubBlock.
Referenced by readTriple().
|
static |
Definition at line 347 of file BitcodeReader.cpp.
References llvm::BitstreamCursor::advance(), Context, llvm::ArrayRef< T >::empty(), llvm::BitstreamEntry::EndBlock, error(), llvm::BitstreamEntry::Error, llvm::Exponent, F(), llvm::MetadataAsValue::get(), llvm::Intrinsic::getAttributes(), llvm::Type::getContext(), llvm::MetadataLoader::getMetadataFwdRefOrLoad(), llvm::BitcodeReaderValueList::getValueFwdRef(), llvm::BitstreamEntry::ID, llvm::Type::isMetadataTy(), llvm::BitstreamEntry::Kind, Kind, llvm::bitc::MODULE_BLOCK_ID, Name, parseAttrKind(), llvm::parseModule(), readModuleTriple(), llvm::BitstreamEntry::Record, llvm::BitstreamCursor::setBlockInfo(), llvm::SmallVectorBase::size(), llvm::ArrayRef< T >::size(), llvm::BitstreamCursor::SkipBlock(), llvm::BitstreamCursor::skipRecord(), llvm::ArrayRef< T >::slice(), llvm::Twine::str(), llvm::StripDebugInfo(), and llvm::BitstreamEntry::SubBlock.
Referenced by llvm::getBitcodeTargetTriple().
Definition at line 2145 of file BitcodeReader.cpp.
References llvm::MCID::Add, llvm::BitstreamCursor::advanceSkippingSubblocks(), llvm::lltok::APFloat, assert(), llvm::SmallVectorTemplateCommon< T >::back(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ArrayRef< T >::begin(), llvm::Function::begin(), llvm::SmallVectorImpl< T >::clear(), llvm::bitc::CONSTANTS_BLOCK_ID, llvm::BasicBlock::Create(), llvm::bitc::CST_CODE_AGGREGATE, llvm::bitc::CST_CODE_BLOCKADDRESS, llvm::bitc::CST_CODE_CE_BINOP, llvm::bitc::CST_CODE_CE_CAST, llvm::bitc::CST_CODE_CE_CMP, llvm::bitc::CST_CODE_CE_EXTRACTELT, llvm::bitc::CST_CODE_CE_GEP, llvm::bitc::CST_CODE_CE_GEP_WITH_INRANGE_INDEX, llvm::bitc::CST_CODE_CE_INBOUNDS_GEP, llvm::bitc::CST_CODE_CE_INSERTELT, llvm::bitc::CST_CODE_CE_SELECT, llvm::bitc::CST_CODE_CE_SHUFFLEVEC, llvm::bitc::CST_CODE_CE_SHUFVEC_EX, llvm::bitc::CST_CODE_CE_UNOP, llvm::bitc::CST_CODE_CSTRING, llvm::bitc::CST_CODE_DATA, llvm::bitc::CST_CODE_FLOAT, llvm::bitc::CST_CODE_INLINEASM, llvm::bitc::CST_CODE_INLINEASM_OLD, llvm::bitc::CST_CODE_INTEGER, llvm::bitc::CST_CODE_NULL, llvm::bitc::CST_CODE_SETTYPE, llvm::bitc::CST_CODE_STRING, llvm::bitc::CST_CODE_UNDEF, llvm::bitc::CST_CODE_WIDE_INTEGER, llvm::dyn_cast(), E, llvm::SmallVectorBase::empty(), llvm::Function::empty(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::Function::end(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, llvm::InlineAsm::get(), llvm::ConstantInt::get(), llvm::ConstantFP::get(), llvm::VectorType::get(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::ConstantVector::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::BlockAddress::get(), llvm::ConstantExpr::get(), llvm::UndefValue::get(), getBitWidth(), llvm::ConstantExpr::getCast(), llvm::SimpleBitstreamCursor::GetCurrentBitNo(), getDecodedBinaryOpcode(), getDecodedCastOpcode(), getDecodedUnaryOpcode(), llvm::SequentialType::getElementType(), llvm::PointerType::getElementType(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getFCmp(), llvm::ConstantDataArray::getFP(), llvm::ConstantDataVector::getFP(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getICmp(), llvm::ConstantExpr::getInsertElement(), llvm::Type::getInt1Ty(), llvm::Type::getInt32Ty(), llvm::Constant::getNullValue(), llvm::SequentialType::getNumElements(), llvm::ConstantExpr::getSelect(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantDataArray::getString(), getType(), llvm::Value::getType(), llvm::Type::getVoidTy(), I, llvm::BitstreamEntry::ID, llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::IEEEhalf(), llvm::APFloatBase::IEEEquad(), llvm::APFloatBase::IEEEsingle(), llvm::Type::isDoubleTy(), llvm::PossiblyExactOperator::IsExact, llvm::Type::isFloatTy(), llvm::Type::isFP128Ty(), llvm::Type::isFPOrFPVectorTy(), llvm::Type::isHalfTy(), llvm::Type::isIntegerTy(), llvm::Type::isPPC_FP128Ty(), llvm::Type::isX86_FP80Ty(), llvm::SimpleBitstreamCursor::JumpToBit(), llvm::BitstreamEntry::Kind, LLVM_FALLTHROUGH, llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::Value::materialized_uses(), llvm::OverflowingBinaryOperator::NoSignedWrap, llvm::OverflowingBinaryOperator::NoUnsignedWrap, llvm::bitc::OBO_NO_SIGNED_WRAP, llvm::bitc::OBO_NO_UNSIGNED_WRAP, llvm::bitc::PEO_EXACT, llvm::SmallVectorTemplateBase< T >::pop_back(), llvm::APFloatBase::PPCDoubleDouble(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, Size, llvm::SmallVectorBase::size(), llvm::DenseMapBase< SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::ArrayRef< T >::size(), llvm::BitstreamCursor::SkipBlock(), llvm::Value::sortUseList(), llvm::BitstreamEntry::SubBlock, llvm::Error::success(), llvm::transform(), llvm::UpgradeBitCastExpr(), llvm::UpgradeInlineAsmString(), llvm::bitc::USELIST_BLOCK_ID, llvm::bitc::USELIST_CODE_BB, llvm::bitc::USELIST_CODE_DEFAULT, and llvm::APFloatBase::x87DoubleExtended().
Definition at line 5227 of file BitcodeReader.cpp.
References llvm::ModuleSummaryIndex::addGlobalValueSummary(), llvm::ModuleSummaryIndex::addModule(), llvm::ModuleSummaryIndex::addOriginalName(), llvm::BitstreamCursor::advanceSkippingSubblocks(), assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::ModuleSummaryIndex::cfiFunctionDecls(), llvm::ModuleSummaryIndex::cfiFunctionDefs(), llvm::SmallVectorImpl< T >::clear(), convertToString(), llvm::CorruptedBitcode, E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::BitstreamEntry::EndBlock, llvm::BitstreamCursor::EnterSubBlock(), error(), llvm::BitstreamEntry::Error, error_category, llvm::ModuleSummaryIndex::findSummaryInModule(), llvm::StringMapEntry< ValueTy >::first(), first, llvm::bitc::FS_ALIAS, llvm::bitc::FS_CFI_FUNCTION_DECLS, llvm::bitc::FS_CFI_FUNCTION_DEFS, llvm::bitc::FS_COMBINED, llvm::bitc::FS_COMBINED_ALIAS, llvm::bitc::FS_COMBINED_GLOBALVAR_INIT_REFS, llvm::bitc::FS_COMBINED_ORIGINAL_NAME, llvm::bitc::FS_COMBINED_PROFILE, llvm::bitc::FS_FLAGS, llvm::bitc::FS_PERMODULE, llvm::bitc::FS_PERMODULE_GLOBALVAR_INIT_REFS, llvm::bitc::FS_PERMODULE_PROFILE, llvm::bitc::FS_PERMODULE_RELBF, llvm::bitc::FS_TYPE_CHECKED_LOAD_CONST_VCALL, llvm::bitc::FS_TYPE_CHECKED_LOAD_VCALLS, llvm::bitc::FS_TYPE_ID, llvm::bitc::FS_TYPE_TEST_ASSUME_CONST_VCALL, llvm::bitc::FS_TYPE_TEST_ASSUME_VCALLS, llvm::bitc::FS_TYPE_TESTS, llvm::bitc::FS_VALUE_GUID, llvm::bitc::FS_VERSION, getDecodedFFlags(), getDecodedGVarFlags(), getDecodedGVSummaryFlags(), llvm::ValueInfo::getGUID(), llvm::ModuleSummaryIndex::getOrInsertValueInfo(), I, llvm::BitstreamEntry::ID, llvm::ARM_PROC::IE, llvm::BitstreamEntry::Kind, llvm_unreachable, llvm::bitc::MODULE_STRTAB_BLOCK_ID, llvm::bitc::MST_CODE_ENTRY, llvm::bitc::MST_CODE_HASH, name, parseTypeIdSummaryRecord(), llvm::BitstreamCursor::readRecord(), llvm::BitstreamEntry::Record, llvm::StringMapEntry< ValueTy >::second, llvm::ModuleSummaryIndex::setEnableSplitLTOUnit(), llvm::ModuleSummaryIndex::setHasSyntheticEntryCounts(), llvm::GlobalValueSummary::setModulePath(), llvm::GlobalValueSummary::setOriginalName(), llvm::ModuleSummaryIndex::setPartiallySplitLTOUnits(), llvm::ModuleSummaryIndex::setSkipModuleByDistributedBackend(), llvm::ModuleSummaryIndex::setWithGlobalValueDeadStripping(), llvm::SmallVectorBase::size(), llvm::BitstreamEntry::SubBlock, llvm::Error::success(), llvm::IndexedInstrProf::Version, and VI.
|
static |
Definition at line 156 of file BitcodeReader.cpp.
References F(), I, llvm::instructions(), and llvm::LLVMContext::MD_tbaa.
|
static |
Definition at line 1091 of file BitcodeReader.cpp.
References llvm::StructType::create(), llvm::GlobalValue::DLLExportStorageClass, llvm::GlobalValue::DLLImportStorageClass, Name, llvm::MipsISD::Ret, and llvm::GlobalValue::setDLLStorageClass().
|
static |
Definition at line 5702 of file BitcodeReader.cpp.
Referenced by llvm::BitcodeErrorCategory().