Skip to content

Commit 40ec1c0

Browse files
ibooksteinMaskRay
authored andcommitted
[IR][NFC] Rename getBaseObject to getAliaseeObject
To better reflect the meaning of the now-disambiguated {GlobalValue, GlobalAlias}::getBaseObject after breaking off GlobalIFunc::getResolverFunction (D109792), the function is renamed to getAliaseeObject.
1 parent 6707a7d commit 40ec1c0

25 files changed

+58
-57
lines changed

clang/lib/CodeGen/MicrosoftCXXABI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ llvm::GlobalVariable *MicrosoftCXXABI::getAddrOfVTable(const CXXRecordDecl *RD,
18441844
VFTablesMap[ID] = VFTable;
18451845
VTable = VTableAliasIsRequred
18461846
? cast<llvm::GlobalVariable>(
1847-
cast<llvm::GlobalAlias>(VFTable)->getBaseObject())
1847+
cast<llvm::GlobalAlias>(VFTable)->getAliaseeObject())
18481848
: cast<llvm::GlobalVariable>(VFTable);
18491849
return VTable;
18501850
}

llvm/include/llvm/IR/GlobalAlias.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ class GlobalAlias : public GlobalIndirectSymbol,
7777
return getIndirectSymbol();
7878
}
7979

80-
const GlobalObject *getBaseObject() const;
81-
GlobalObject *getBaseObject() {
80+
const GlobalObject *getAliaseeObject() const;
81+
GlobalObject *getAliaseeObject() {
8282
return const_cast<GlobalObject *>(
83-
static_cast<const GlobalAlias *>(this)->getBaseObject());
83+
static_cast<const GlobalAlias *>(this)->getAliaseeObject());
8484
}
8585

8686
static bool isValidLinkage(LinkageTypes L) {

llvm/include/llvm/IR/GlobalIndirectSymbol.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ class GlobalIndirectSymbol : public GlobalValue {
5757
static_cast<const GlobalIndirectSymbol *>(this)->getIndirectSymbol());
5858
}
5959

60-
const GlobalObject *getBaseObject() const;
61-
GlobalObject *getBaseObject() {
60+
const GlobalObject *getAliaseeObject() const;
61+
GlobalObject *getAliaseeObject() {
6262
return const_cast<GlobalObject *>(
63-
static_cast<const GlobalIndirectSymbol *>(this)->getBaseObject());
63+
static_cast<const GlobalIndirectSymbol *>(this)->getAliaseeObject());
6464
}
6565

6666
// Methods for support type inquiry through isa, cast, and dyn_cast:

llvm/include/llvm/IR/GlobalValue.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,10 @@ class GlobalValue : public Constant {
554554
return !(isDeclarationForLinker() || isWeakForLinker());
555555
}
556556

557-
const GlobalObject *getBaseObject() const;
558-
GlobalObject *getBaseObject() {
557+
const GlobalObject *getAliaseeObject() const;
558+
GlobalObject *getAliaseeObject() {
559559
return const_cast<GlobalObject *>(
560-
static_cast<const GlobalValue *>(this)->getBaseObject());
560+
static_cast<const GlobalValue *>(this)->getAliaseeObject());
561561
}
562562

563563
/// Returns whether this is a reference to an absolute symbol.

llvm/lib/Analysis/ModuleSummaryAnalysis.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ static void computeFunctionSummary(
342342
// called aliasee for the checks below.
343343
if (auto *GA = dyn_cast<GlobalAlias>(CalledValue)) {
344344
assert(!CalledFunction && "Expected null called function in callsite for alias");
345-
CalledFunction = dyn_cast<Function>(GA->getBaseObject());
345+
CalledFunction = dyn_cast<Function>(GA->getAliaseeObject());
346346
}
347347
// Check if this is a direct call to a known function or a known
348348
// intrinsic, or an indirect call with profile data.
@@ -645,7 +645,7 @@ computeAliasSummary(ModuleSummaryIndex &Index, const GlobalAlias &A,
645645
/* Live = */ false, A.isDSOLocal(),
646646
A.hasLinkOnceODRLinkage() && A.hasGlobalUnnamedAddr());
647647
auto AS = std::make_unique<AliasSummary>(Flags);
648-
auto *Aliasee = A.getBaseObject();
648+
auto *Aliasee = A.getAliaseeObject();
649649
auto AliaseeVI = Index.getValueInfo(Aliasee->getGUID());
650650
assert(AliaseeVI && "Alias expects aliasee summary to be available");
651651
assert(AliaseeVI.getSummaryList().size() == 1 &&

llvm/lib/Analysis/StackSafetyAnalysis.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ const Function *findCalleeInModule(const GlobalValue *GV) {
685685
const GlobalAlias *A = dyn_cast<GlobalAlias>(GV);
686686
if (!A)
687687
return nullptr;
688-
GV = A->getBaseObject();
688+
GV = A->getAliaseeObject();
689689
if (GV == A)
690690
return nullptr;
691691
}

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4039,7 +4039,7 @@ void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
40394039
FSModVTableRefsAbbrev);
40404040

40414041
for (const GlobalAlias &A : M.aliases()) {
4042-
auto *Aliasee = A.getBaseObject();
4042+
auto *Aliasee = A.getAliaseeObject();
40434043
if (!Aliasee->hasName())
40444044
// Nameless function don't have an entry in the summary, skip it.
40454045
continue;

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1666,9 +1666,9 @@ void AsmPrinter::emitGlobalIndirectSymbol(Module &M,
16661666
// size of the alias symbol from the type of the alias. We don't do this in
16671667
// other situations as the alias and aliasee having differing types but same
16681668
// size may be intentional.
1669-
const GlobalObject *BaseObject = GA->getBaseObject();
1669+
const GlobalObject *Aliasee = GA->getAliaseeObject();
16701670
if (MAI->hasDotTypeDotSizeDirective() && GA->getValueType()->isSized() &&
1671-
(!BaseObject || BaseObject->hasPrivateLinkage())) {
1671+
(!Aliasee || Aliasee->hasPrivateLinkage())) {
16721672
const DataLayout &DL = M.getDataLayout();
16731673
uint64_t Size = DL.getTypeAllocSize(GA->getValueType());
16741674
OutStreamer->emitELFSize(Name, MCConstantExpr::create(Size, OutContext));

llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -1495,7 +1495,7 @@ void TargetLoweringObjectFileMachO::getNameWithPrefix(
14951495
SmallVectorImpl<char> &OutName, const GlobalValue *GV,
14961496
const TargetMachine &TM) const {
14971497
bool CannotUsePrivateLabel = true;
1498-
if (auto *GO = GV->getBaseObject()) {
1498+
if (auto *GO = GV->getAliaseeObject()) {
14991499
SectionKind GOKind = TargetLoweringObjectFile::getKindForGlobal(GO, TM);
15001500
const MCSection *TheSection = SectionForGlobal(GO, GOKind, TM);
15011501
CannotUsePrivateLabel =
@@ -1566,7 +1566,7 @@ static int getSelectionForCOFF(const GlobalValue *GV) {
15661566
if (const Comdat *C = GV->getComdat()) {
15671567
const GlobalValue *ComdatKey = getComdatGVForCOFF(GV);
15681568
if (const auto *GA = dyn_cast<GlobalAlias>(ComdatKey))
1569-
ComdatKey = GA->getBaseObject();
1569+
ComdatKey = GA->getAliaseeObject();
15701570
if (ComdatKey == GV) {
15711571
switch (C->getSelectionKind()) {
15721572
case Comdat::Any:
@@ -2490,12 +2490,12 @@ TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(const GlobalValue *GV) {
24902490

24912491
MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(
24922492
const GlobalValue *Func, const TargetMachine &TM) const {
2493-
assert(
2494-
(isa<Function>(Func) ||
2495-
(isa<GlobalAlias>(Func) &&
2496-
isa_and_nonnull<Function>(cast<GlobalAlias>(Func)->getBaseObject()))) &&
2497-
"Func must be a function or an alias which has a function as base "
2498-
"object.");
2493+
assert((isa<Function>(Func) ||
2494+
(isa<GlobalAlias>(Func) &&
2495+
isa_and_nonnull<Function>(
2496+
cast<GlobalAlias>(Func)->getAliaseeObject()))) &&
2497+
"Func must be a function or an alias which has a function as base "
2498+
"object.");
24992499

25002500
SmallString<128> NameStr;
25012501
NameStr.push_back('.');

llvm/lib/IR/Globals.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ std::string GlobalValue::getGlobalIdentifier() const {
162162
StringRef GlobalValue::getSection() const {
163163
if (auto *GA = dyn_cast<GlobalAlias>(this)) {
164164
// In general we cannot compute this at the IR level, but we try.
165-
if (const GlobalObject *GO = GA->getBaseObject())
165+
if (const GlobalObject *GO = GA->getAliaseeObject())
166166
return GO->getSection();
167167
return "";
168168
}
@@ -172,7 +172,7 @@ StringRef GlobalValue::getSection() const {
172172
const Comdat *GlobalValue::getComdat() const {
173173
if (auto *GA = dyn_cast<GlobalAlias>(this)) {
174174
// In general we cannot compute this at the IR level, but we try.
175-
if (const GlobalObject *GO = GA->getBaseObject())
175+
if (const GlobalObject *GO = GA->getAliaseeObject())
176176
return const_cast<GlobalObject *>(GO)->getComdat();
177177
return nullptr;
178178
}
@@ -280,11 +280,11 @@ bool GlobalObject::canIncreaseAlignment() const {
280280
return true;
281281
}
282282

283-
const GlobalObject *GlobalValue::getBaseObject() const {
283+
const GlobalObject *GlobalValue::getAliaseeObject() const {
284284
if (auto *GO = dyn_cast<GlobalObject>(this))
285285
return GO;
286286
if (auto *GA = dyn_cast<GlobalAlias>(this))
287-
return GA->getBaseObject();
287+
return GA->getAliaseeObject();
288288
return nullptr;
289289
}
290290

@@ -519,7 +519,7 @@ void GlobalAlias::setAliasee(Constant *Aliasee) {
519519
setIndirectSymbol(Aliasee);
520520
}
521521

522-
const GlobalObject *GlobalAlias::getBaseObject() const {
522+
const GlobalObject *GlobalAlias::getAliaseeObject() const {
523523
DenseSet<const GlobalAlias *> Aliases;
524524
return findBaseObject(getOperand(0), Aliases);
525525
}

llvm/lib/LTO/LTO.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ LTO::addRegularLTO(BitcodeModule BM, ArrayRef<InputFile::Symbol> Syms,
733733

734734
DenseSet<GlobalObject *> AliasedGlobals;
735735
for (auto &GA : M.aliases())
736-
if (GlobalObject *GO = GA.getBaseObject())
736+
if (GlobalObject *GO = GA.getAliaseeObject())
737737
AliasedGlobals.insert(GO);
738738

739739
// In this function we need IR GlobalValues matching the symbols in Syms

llvm/lib/Linker/LinkModules.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ bool ModuleLinker::getComdatLeader(Module &M, StringRef ComdatName,
133133
const GlobalVariable *&GVar) {
134134
const GlobalValue *GVal = M.getNamedValue(ComdatName);
135135
if (const auto *GA = dyn_cast_or_null<GlobalAlias>(GVal)) {
136-
GVal = GA->getBaseObject();
136+
GVal = GA->getAliaseeObject();
137137
if (!GVal)
138138
// We cannot resolve the size of the aliasee yet.
139139
return emitError("Linking COMDATs named '" + ComdatName +

llvm/lib/Object/IRSymtab.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@ Error Builder::addSymbol(const ModuleSymbolTable &Msymtab,
283283
Uncommon().CommonAlign = GVar->getAlignment();
284284
}
285285

286-
const GlobalObject *Base = GV->getBaseObject();
287-
if (!Base) {
286+
const GlobalObject *GO = GV->getAliaseeObject();
287+
if (!GO) {
288288
if (isa<GlobalIFunc>(GV))
289-
Base = cast<GlobalIFunc>(GV)->getResolverFunction();
290-
if (!Base)
289+
GO = cast<GlobalIFunc>(GV)->getResolverFunction();
290+
if (!GO)
291291
return make_error<StringError>("Unable to determine comdat of alias!",
292292
inconvertibleErrorCode());
293293
}
294-
if (const Comdat *C = Base->getComdat()) {
294+
if (const Comdat *C = GO->getComdat()) {
295295
Expected<int> ComdatIndexOrErr = getComdatIndex(C, GV->getParent());
296296
if (!ComdatIndexOrErr)
297297
return ComdatIndexOrErr.takeError();
@@ -316,8 +316,8 @@ Error Builder::addSymbol(const ModuleSymbolTable &Msymtab,
316316
}
317317
}
318318

319-
if (!Base->getSection().empty())
320-
setStr(Uncommon().SectionName, Saver.save(Base->getSection()));
319+
if (!GO->getSection().empty())
320+
setStr(Uncommon().SectionName, Saver.save(GO->getSection()));
321321

322322
return Error::success();
323323
}

llvm/lib/Object/ModuleSymbolTable.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ uint32_t ModuleSymbolTable::getSymbolFlags(Symbol S) const {
204204
if (GVar->isConstant())
205205
Res |= BasicSymbolRef::SF_Const;
206206
}
207-
if (isa_and_nonnull<Function>(GV->getBaseObject()) || isa<GlobalIFunc>(GV))
207+
if (isa_and_nonnull<Function>(GV->getAliaseeObject()) || isa<GlobalIFunc>(GV))
208208
Res |= BasicSymbolRef::SF_Executable;
209209
if (isa<GlobalAlias>(GV))
210210
Res |= BasicSymbolRef::SF_Indirect;

llvm/lib/Target/ARM/ARMISelLowering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3801,7 +3801,7 @@ static SDValue promoteToConstantPool(const ARMTargetLowering *TLI,
38013801

38023802
bool ARMTargetLowering::isReadOnly(const GlobalValue *GV) const {
38033803
if (const GlobalAlias *GA = dyn_cast<GlobalAlias>(GV))
3804-
if (!(GV = GA->getBaseObject()))
3804+
if (!(GV = GA->getAliaseeObject()))
38053805
return false;
38063806
if (const auto *V = dyn_cast<GlobalVariable>(GV))
38073807
return V->isConstant();

llvm/lib/Target/Hexagon/HexagonISelLowering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,7 @@ HexagonTargetLowering::LowerGLOBALADDRESS(SDValue Op, SelectionDAG &DAG) const {
12311231

12321232
if (RM == Reloc::Static) {
12331233
SDValue GA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, Offset);
1234-
const GlobalObject *GO = GV->getBaseObject();
1234+
const GlobalObject *GO = GV->getAliaseeObject();
12351235
if (GO && Subtarget.useSmallData() && HLOF.isGlobalInSmallSection(GO, HTM))
12361236
return DAG.getNode(HexagonISD::CONST32_GP, dl, PtrVT, GA);
12371237
return DAG.getNode(HexagonISD::CONST32, dl, PtrVT, GA);

llvm/lib/Target/Lanai/LanaiISelLowering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ SDValue LanaiTargetLowering::LowerGlobalAddress(SDValue Op,
11761176

11771177
// If the code model is small or global variable will be placed in the small
11781178
// section, then assume address will fit in 21-bits.
1179-
const GlobalObject *GO = GV->getBaseObject();
1179+
const GlobalObject *GO = GV->getAliaseeObject();
11801180
if (TLOF->isGlobalInSmallSection(GO, getTargetMachine())) {
11811181
SDValue Small = DAG.getTargetGlobalAddress(
11821182
GV, DL, getPointerTy(DAG.getDataLayout()), Offset, LanaiII::MO_NO_FLAG);

llvm/lib/Target/Mips/MipsISelLowering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op,
20762076
const MipsTargetObjectFile *TLOF =
20772077
static_cast<const MipsTargetObjectFile *>(
20782078
getTargetMachine().getObjFileLowering());
2079-
const GlobalObject *GO = GV->getBaseObject();
2079+
const GlobalObject *GO = GV->getAliaseeObject();
20802080
if (GO && TLOF->IsGlobalInSmallSection(GO, getTargetMachine()))
20812081
// %gp_rel relocation
20822082
return getAddrGPRel(N, SDLoc(N), Ty, DAG, ABI.IsN64());

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2528,7 +2528,7 @@ bool PPCAIXAsmPrinter::doInitialization(Module &M) {
25282528

25292529
// Construct an aliasing list for each GlobalObject.
25302530
for (const auto &Alias : M.aliases()) {
2531-
const GlobalObject *Base = Alias.getBaseObject();
2531+
const GlobalObject *Base = Alias.getAliaseeObject();
25322532
if (!Base)
25332533
report_fatal_error(
25342534
"alias without a base object is not yet supported on AIX");

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4643,7 +4643,7 @@ static bool callsShareTOCBase(const Function *Caller, SDValue Callee,
46434643

46444644
// If we have an Alias we can try to get the function from there.
46454645
if (Alias) {
4646-
const GlobalObject *GlobalObj = Alias->getBaseObject();
4646+
const GlobalObject *GlobalObj = Alias->getAliaseeObject();
46474647
F = dyn_cast<Function>(GlobalObj);
46484648
}
46494649

llvm/lib/Transforms/IPO/FunctionImport.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ void llvm::thinLTOInternalizeModule(Module &TheModule,
11841184

11851185
/// Make alias a clone of its aliasee.
11861186
static Function *replaceAliasWithAliasee(Module *SrcModule, GlobalAlias *GA) {
1187-
Function *Fn = cast<Function>(GA->getBaseObject());
1187+
Function *Fn = cast<Function>(GA->getAliaseeObject());
11881188

11891189
ValueToValueMapTy VMap;
11901190
Function *NewFn = CloneFunction(Fn, VMap);
@@ -1290,12 +1290,12 @@ Expected<bool> FunctionImporter::importFunctions(
12901290
if (Error Err = GA.materialize())
12911291
return std::move(Err);
12921292
// Import alias as a copy of its aliasee.
1293-
GlobalObject *Base = GA.getBaseObject();
1294-
if (Error Err = Base->materialize())
1293+
GlobalObject *GO = GA.getAliaseeObject();
1294+
if (Error Err = GO->materialize())
12951295
return std::move(Err);
12961296
auto *Fn = replaceAliasWithAliasee(SrcModule.get(), &GA);
1297-
LLVM_DEBUG(dbgs() << "Is importing aliasee fn " << Base->getGUID()
1298-
<< " " << Base->getName() << " from "
1297+
LLVM_DEBUG(dbgs() << "Is importing aliasee fn " << GO->getGUID() << " "
1298+
<< GO->getName() << " from "
12991299
<< SrcModule->getSourceFileName() << "\n");
13001300
if (EnableImportMetadata) {
13011301
// Add 'thinlto_src_module' metadata for statistics and debugging.

llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ void splitAndWriteThinLTOBitcode(
323323
return true;
324324
if (auto *F = dyn_cast<Function>(GV))
325325
return EligibleVirtualFns.count(F);
326-
if (auto *GVar = dyn_cast_or_null<GlobalVariable>(GV->getBaseObject()))
326+
if (auto *GVar =
327+
dyn_cast_or_null<GlobalVariable>(GV->getAliaseeObject()))
327328
return HasTypeMetadata(GVar);
328329
return false;
329330
}));
@@ -352,7 +353,7 @@ void splitAndWriteThinLTOBitcode(
352353
// Remove all globals with type metadata, globals with comdats that live in
353354
// MergedM, and aliases pointing to such globals from the thin LTO module.
354355
filterModule(&M, [&](const GlobalValue *GV) {
355-
if (auto *GVar = dyn_cast_or_null<GlobalVariable>(GV->getBaseObject()))
356+
if (auto *GVar = dyn_cast_or_null<GlobalVariable>(GV->getAliaseeObject()))
356357
if (HasTypeMetadata(GVar))
357358
return false;
358359
if (const auto *C = GV->getComdat())

llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ bool DataFlowSanitizer::runImpl(Module &M) {
14301430
++AI;
14311431
// Don't stop on weak. We assume people aren't playing games with the
14321432
// instrumentedness of overridden weak aliases.
1433-
auto *F = dyn_cast<Function>(GA->getBaseObject());
1433+
auto *F = dyn_cast<Function>(GA->getAliaseeObject());
14341434
if (!F)
14351435
continue;
14361436

llvm/lib/Transforms/Utils/SplitModule.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ static void findPartitions(Module &M, ClusterIDMapType &ClusterIDMap,
126126
// For aliases we should not separate them from their aliasees regardless
127127
// of linkage.
128128
if (auto *GIS = dyn_cast<GlobalAlias>(&GV)) {
129-
if (const GlobalObject *Base = GIS->getBaseObject())
130-
GVtoClusterMap.unionSets(&GV, Base);
129+
if (const GlobalObject *Aliasee = GIS->getAliaseeObject())
130+
GVtoClusterMap.unionSets(&GV, Aliasee);
131131
} else if (auto *GIS = dyn_cast<GlobalIFunc>(&GV)) {
132132
GVtoClusterMap.unionSets(&GV, GIS->getResolverFunction());
133133
}
@@ -228,7 +228,7 @@ static void externalize(GlobalValue *GV) {
228228
// Returns whether GV should be in partition (0-based) I of N.
229229
static bool isInPartition(const GlobalValue *GV, unsigned I, unsigned N) {
230230
if (auto *GIS = dyn_cast<GlobalAlias>(GV)) {
231-
if (const GlobalObject *Base = GIS->getBaseObject())
231+
if (const GlobalObject *Base = GIS->getAliaseeObject())
232232
GV = Base;
233233
} else if (auto *GIS = dyn_cast<GlobalIFunc>(GV)) {
234234
GV = GIS->getResolverFunction();

llvm/tools/bugpoint/CrashDebugger.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ bool ReduceCrashingFunctions::TestFuncs(std::vector<Function *> &Funcs) {
269269
std::vector<GlobalValue *> ToRemove;
270270
// First, remove aliases to functions we're about to purge.
271271
for (GlobalAlias &Alias : M->aliases()) {
272-
GlobalObject *Root = Alias.getBaseObject();
272+
GlobalObject *Root = Alias.getAliaseeObject();
273273
Function *F = dyn_cast_or_null<Function>(Root);
274274
if (F) {
275275
if (Functions.count(F))

0 commit comments

Comments
 (0)