aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Module.cpp
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2021-06-21 15:09:23 -0700
committerNick Desaulniers <ndesaulniers@google.com>2021-06-21 15:09:25 -0700
commit8ace12130526f450c822ca232d1f865b247d7434 (patch)
tree4552bd2698f7a5e3a1b8148e8853106fc7d61770 /llvm/lib/IR/Module.cpp
parent759e7977679299296a0074bc3aba693d3386eb1c (diff)
downloadllvm-8ace12130526f450c822ca232d1f865b247d7434.zip
llvm-8ace12130526f450c822ca232d1f865b247d7434.tar.gz
llvm-8ace12130526f450c822ca232d1f865b247d7434.tar.bz2
[IR] convert warn-stack-size from module flag to fn attr
Otherwise, this causes issues when building with LTO for object files that use different values. Link: https://github.com/ClangBuiltLinux/linux/issues/1395 Reviewed By: dblaikie, MaskRay Differential Revision: https://reviews.llvm.org/D104342
Diffstat (limited to 'llvm/lib/IR/Module.cpp')
-rw-r--r--llvm/lib/IR/Module.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index 40d3401..9b95550 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -732,17 +732,6 @@ void Module::setOverrideStackAlignment(unsigned Align) {
addModuleFlag(ModFlagBehavior::Error, "override-stack-alignment", Align);
}
-unsigned Module::getWarnStackSize() const {
- Metadata *MD = getModuleFlag("warn-stack-size");
- if (auto *CI = mdconst::dyn_extract_or_null<ConstantInt>(MD))
- return CI->getZExtValue();
- return UINT_MAX;
-}
-
-void Module::setWarnStackSize(unsigned Threshold) {
- addModuleFlag(ModFlagBehavior::Error, "warn-stack-size", Threshold);
-}
-
void Module::setSDKVersion(const VersionTuple &V) {
SmallVector<unsigned, 3> Entries;
Entries.push_back(V.getMajor());