aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Module.cpp12
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp15
2 files changed, 0 insertions, 27 deletions
diff --git a/llvm/lib/IR/Module.cpp b/llvm/lib/IR/Module.cpp
index b51ea45..5cd74d5 100644
--- a/llvm/lib/IR/Module.cpp
+++ b/llvm/lib/IR/Module.cpp
@@ -714,18 +714,6 @@ void Module::setStackProtectorGuardReg(StringRef Reg) {
addModuleFlag(ModFlagBehavior::Error, "stack-protector-guard-reg", ID);
}
-StringRef Module::getStackProtectorGuardSymbol() const {
- Metadata *MD = getModuleFlag("stack-protector-guard-symbol");
- if (auto *MDS = dyn_cast_or_null<MDString>(MD))
- return MDS->getString();
- return {};
-}
-
-void Module::setStackProtectorGuardSymbol(StringRef Symbol) {
- MDString *ID = MDString::get(getContext(), Symbol);
- addModuleFlag(ModFlagBehavior::Error, "stack-protector-guard-symbol", ID);
-}
-
int Module::getStackProtectorGuardOffset() const {
Metadata *MD = getModuleFlag("stack-protector-guard-offset");
if (auto *CI = mdconst::dyn_extract_or_null<ConstantInt>(MD))
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 6dc823f..047ac0d 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -2845,21 +2845,6 @@ Value *X86TargetLowering::getIRStackGuard(IRBuilderBase &IRB) const {
AddressSpace = X86AS::FS;
else if (GuardReg == "gs")
AddressSpace = X86AS::GS;
-
- // Use symbol guard if user specify.
- StringRef GuardSymb = M->getStackProtectorGuardSymbol();
- if (!GuardSymb.empty()) {
- GlobalVariable *GV = M->getGlobalVariable(GuardSymb);
- if (!GV) {
- Type *Ty = Subtarget.is64Bit() ? Type::getInt64Ty(M->getContext())
- : Type::getInt32Ty(M->getContext());
- GV = new GlobalVariable(*M, Ty, false, GlobalValue::ExternalLinkage,
- nullptr, GuardSymb, nullptr,
- GlobalValue::NotThreadLocal, AddressSpace);
- }
- return GV;
- }
-
return SegmentOffset(IRB, Offset, AddressSpace);
}
}