definition() is supposed to be used through isa, dyn_cast or cast.
It's better to not call that directly.
llvm-svn: 219723
bool shouldReplaceTargetWithGOTAtom(const Atom *target, bool canBypassGOT) {
// Accesses to shared library symbols must go through GOT.
- if (target->definition() == Atom::definitionSharedLibrary)
+ if (isa<SharedLibraryAtom>(target))
return true;
// Accesses to interposable symbols in same linkage unit must also go
// through GOT.
continue;
const Atom *target = ref->target();
assert(target != nullptr);
- if (target->definition() == Atom::definitionSharedLibrary) {
+ if (isa<SharedLibraryAtom>(target)) {
// Calls to shared libraries go through stubs.
replaceCalleeWithStub(target, ref);
continue;