diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2021-02-16 20:13:02 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2021-02-16 20:13:02 +0000 |
commit | b60736ec1405bb0a8dd40989f67ef4c93da068ab (patch) | |
tree | 5c43fbb7c9fc45f0f87e0e6795a86267dbd12f9d /llvm/lib/IR/Module.cpp | |
parent | cfca06d7963fa0909f90483b42a6d7d194d01e08 (diff) |
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r-- | llvm/lib/IR/Module.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp index 3ea181a9b48d..b4f10e2e2d23 100644 --- a/llvm/lib/IR/Module.cpp +++ b/llvm/lib/IR/Module.cpp @@ -582,7 +582,7 @@ void Module::setProfileSummary(Metadata *M, ProfileSummary::Kind Kind) { setModuleFlag(ModFlagBehavior::Error, "ProfileSummary", M); } -Metadata *Module::getProfileSummary(bool IsCS) { +Metadata *Module::getProfileSummary(bool IsCS) const { return (IsCS ? getModuleFlag("CSProfileSummary") : getModuleFlag("ProfileSummary")); } @@ -601,13 +601,6 @@ void Module::setSemanticInterposition(bool SI) { addModuleFlag(ModFlagBehavior::Error, "SemanticInterposition", SI); } -bool Module::noSemanticInterposition() const { - // Conservatively require an explicit zero value for now. - Metadata *MF = getModuleFlag("SemanticInterposition"); - auto *Val = cast_or_null<ConstantAsMetadata>(MF); - return Val && cast<ConstantInt>(Val->getValue())->getZExtValue() == 0; -} - void Module::setOwnedMemoryBuffer(std::unique_ptr<MemoryBuffer> MB) { OwnedMemoryBuffer = std::move(MB); } |