Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 808ced1

Browse files
committed
Revert "Update to LLVM's use of WeakTrackingVH; NFC"
This reverts commit r301427. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301430 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 2dfb9da commit 808ced1

File tree

5 files changed

+12
-14
lines changed

5 files changed

+12
-14
lines changed

lib/CodeGen/CGDeclCXX.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -571,10 +571,9 @@ CodeGenFunction::GenerateCXXGlobalInitFunc(llvm::Function *Fn,
571571
FinishFunction();
572572
}
573573

574-
void CodeGenFunction::GenerateCXXGlobalDtorsFunc(
575-
llvm::Function *Fn,
576-
const std::vector<std::pair<llvm::WeakTrackingVH, llvm::Constant *>>
577-
&DtorsAndObjects) {
574+
void CodeGenFunction::GenerateCXXGlobalDtorsFunc(llvm::Function *Fn,
575+
const std::vector<std::pair<llvm::WeakVH, llvm::Constant*> >
576+
&DtorsAndObjects) {
578577
{
579578
auto NL = ApplyDebugLocation::CreateEmpty(*this);
580579
StartFunction(GlobalDecl(), getContext().VoidTy, Fn,

lib/CodeGen/CGObjCMac.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ class CGObjCCommonMac : public CodeGen::CGObjCRuntime {
886886

887887
/// Cached reference to the class for constant strings. This value has type
888888
/// int * but is actually an Obj-C class pointer.
889-
llvm::WeakTrackingVH ConstantStringClassRef;
889+
llvm::WeakVH ConstantStringClassRef;
890890

891891
/// \brief The LLVM type corresponding to NSConstantString.
892892
llvm::StructType *NSConstantStringType = nullptr;

lib/CodeGen/CodeGenFunction.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3470,10 +3470,9 @@ class CodeGenFunction : public CodeGenTypeCache {
34703470

34713471
/// GenerateCXXGlobalDtorsFunc - Generates code for destroying global
34723472
/// variables.
3473-
void GenerateCXXGlobalDtorsFunc(
3474-
llvm::Function *Fn,
3475-
const std::vector<std::pair<llvm::WeakTrackingVH, llvm::Constant *>>
3476-
&DtorsAndObjects);
3473+
void GenerateCXXGlobalDtorsFunc(llvm::Function *Fn,
3474+
const std::vector<std::pair<llvm::WeakVH,
3475+
llvm::Constant*> > &DtorsAndObjects);
34773476

34783477
void GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn,
34793478
const VarDecl *D,

lib/CodeGen/CodeGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ void CodeGenModule::addCompilerUsedGlobal(llvm::GlobalValue *GV) {
11501150
}
11511151

11521152
static void emitUsed(CodeGenModule &CGM, StringRef Name,
1153-
std::vector<llvm::WeakTrackingVH> &List) {
1153+
std::vector<llvm::WeakVH> &List) {
11541154
// Don't create llvm.used if there is no need.
11551155
if (List.empty())
11561156
return;

lib/CodeGen/CodeGenModule.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ class CodeGenModule : public CodeGenTypeCache {
349349
/// List of global values which are required to be present in the object file;
350350
/// bitcast to i8*. This is used for forcing visibility of symbols which may
351351
/// otherwise be optimized out.
352-
std::vector<llvm::WeakTrackingVH> LLVMUsed;
353-
std::vector<llvm::WeakTrackingVH> LLVMCompilerUsed;
352+
std::vector<llvm::WeakVH> LLVMUsed;
353+
std::vector<llvm::WeakVH> LLVMCompilerUsed;
354354

355355
/// Store the list of global constructors and their respective priorities to
356356
/// be emitted when the translation unit is complete.
@@ -421,7 +421,7 @@ class CodeGenModule : public CodeGenTypeCache {
421421
SmallVector<GlobalInitData, 8> PrioritizedCXXGlobalInits;
422422

423423
/// Global destructor functions and arguments that need to run on termination.
424-
std::vector<std::pair<llvm::WeakTrackingVH, llvm::Constant *>> CXXGlobalDtors;
424+
std::vector<std::pair<llvm::WeakVH,llvm::Constant*> > CXXGlobalDtors;
425425

426426
/// \brief The complete set of modules that has been imported.
427427
llvm::SetVector<clang::Module *> ImportedModules;
@@ -438,7 +438,7 @@ class CodeGenModule : public CodeGenTypeCache {
438438

439439
/// Cached reference to the class for constant strings. This value has type
440440
/// int * but is actually an Obj-C class pointer.
441-
llvm::WeakTrackingVH CFConstantStringClassRef;
441+
llvm::WeakVH CFConstantStringClassRef;
442442

443443
/// \brief The type used to describe the state of a fast enumeration in
444444
/// Objective-C's for..in loop.

0 commit comments

Comments
 (0)