Skip to content

Commit 0ccb495

Browse files
committed
Minor format/style changes to PPCSubtarget::isGVIndirectSymbol
- use dyn_cast instad of isa + cast - remove erroneously added newline in otherwise untouched code.
1 parent 1c653da commit 0ccb495

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/PowerPC/PPCSubtarget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ void PPCSubtarget::tocDataChecks(unsigned PointerSize,
208208
}
209209

210210
bool PPCSubtarget::isGVIndirectSymbol(const GlobalValue *GV) const {
211-
if (isAIXABI() && isa<GlobalVariable>(GV)) {
212-
// On AIX the only symbols that aren't indirect are toc-data.
213-
if (cast<GlobalVariable>(GV)->hasAttribute("toc-data"))
214-
return false;
211+
if (isAIXABI()) {
212+
if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
213+
// On AIX the only symbols that aren't indirect are toc-data.
214+
return !GVar->hasAttribute("toc-data");
215215

216216
return true;
217217
}

0 commit comments

Comments
 (0)