diff options
| author | 2019-06-23 21:36:31 +0000 | |
|---|---|---|
| committer | 2019-06-23 21:36:31 +0000 | |
| commit | 23f101f37937a1bd4a29726cab2f76e0fb038b35 (patch) | |
| tree | f7da7d6b32c2e07114da399150bfa88d72187012 /gnu/llvm/lib/CodeGen/BuiltinGCs.cpp | |
| parent | sort previous; ok deraadt (diff) | |
| download | wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.tar.xz wireguard-openbsd-23f101f37937a1bd4a29726cab2f76e0fb038b35.zip | |
Import LLVM 8.0.0 release including clang, lld and lldb.
Diffstat (limited to 'gnu/llvm/lib/CodeGen/BuiltinGCs.cpp')
| -rw-r--r-- | gnu/llvm/lib/CodeGen/BuiltinGCs.cpp | 29 |
1 files changed, 8 insertions, 21 deletions
diff --git a/gnu/llvm/lib/CodeGen/BuiltinGCs.cpp b/gnu/llvm/lib/CodeGen/BuiltinGCs.cpp index 3a9b20aa661..93939e573b7 100644 --- a/gnu/llvm/lib/CodeGen/BuiltinGCs.cpp +++ b/gnu/llvm/lib/CodeGen/BuiltinGCs.cpp @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// +#include "llvm/CodeGen/BuiltinGCs.h" #include "llvm/CodeGen/GCStrategy.h" -#include "llvm/CodeGen/GCs.h" #include "llvm/IR/DerivedTypes.h" #include "llvm/Support/Casting.h" @@ -28,10 +28,8 @@ namespace { class ErlangGC : public GCStrategy { public: ErlangGC() { - InitRoots = false; - NeededSafePoints = 1 << GC::PostCall; + NeededSafePoints = true; UsesMetadata = true; - CustomRoots = false; } }; @@ -41,7 +39,7 @@ public: class OcamlGC : public GCStrategy { public: OcamlGC() { - NeededSafePoints = 1 << GC::PostCall; + NeededSafePoints = true; UsesMetadata = true; } }; @@ -56,10 +54,7 @@ public: /// while introducing only minor runtime overhead. class ShadowStackGC : public GCStrategy { public: - ShadowStackGC() { - InitRoots = true; - CustomRoots = true; - } + ShadowStackGC() {} }; /// A GCStrategy which serves as an example for the usage of a statepoint based @@ -74,10 +69,8 @@ public: UseStatepoints = true; // These options are all gc.root specific, we specify them so that the // gc.root lowering code doesn't run. - InitRoots = false; - NeededSafePoints = 0; + NeededSafePoints = false; UsesMetadata = false; - CustomRoots = false; } Optional<bool> isGCManagedPointer(const Type *Ty) const override { @@ -108,10 +101,8 @@ public: UseStatepoints = true; // These options are all gc.root specific, we specify them so that the // gc.root lowering code doesn't run. - InitRoots = false; - NeededSafePoints = 0; + NeededSafePoints = false; UsesMetadata = false; - CustomRoots = false; } Optional<bool> isGCManagedPointer(const Type *Ty) const override { @@ -136,9 +127,5 @@ static GCRegistry::Add<StatepointGC> D("statepoint-example", "an example strategy for statepoint"); static GCRegistry::Add<CoreCLRGC> E("coreclr", "CoreCLR-compatible GC"); -// Provide hooks to ensure the containing library is fully loaded. -void llvm::linkErlangGC() {} -void llvm::linkOcamlGC() {} -void llvm::linkShadowStackGC() {} -void llvm::linkStatepointExampleGC() {} -void llvm::linkCoreCLRGC() {} +// Provide hook to ensure the containing library is fully loaded. +void llvm::linkAllBuiltinGCs() {} |
