Skip to content

Commit 39c7802

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 980ae19 commit 39c7802

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
@@ -186,10 +186,10 @@ bool PPCSubtarget::enableSubRegLiveness() const {
186186
}
187187

188188
bool PPCSubtarget::isGVIndirectSymbol(const GlobalValue *GV) const {
189-
if (isAIXABI() && isa<GlobalVariable>(GV)) {
190-
// On AIX the only symbols that aren't indirect are toc-data.
191-
if (cast<GlobalVariable>(GV)->hasAttribute("toc-data"))
192-
return false;
189+
if (isAIXABI()) {
190+
if (const GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV))
191+
// On AIX the only symbols that aren't indirect are toc-data.
192+
return !GVar->hasAttribute("toc-data");
193193

194194
return true;
195195
}

0 commit comments

Comments
 (0)