forked from OSchip/llvm-project
Use auto for readability. No functionality change.
llvm-svn: 199527
This commit is contained in:
parent
d9696cbda8
commit
251e68b6ae
|
@ -439,15 +439,14 @@ bool Resolver::resolve() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Resolver::MergedFile::addAtom(const Atom &atom) {
|
void Resolver::MergedFile::addAtom(const Atom &atom) {
|
||||||
if (const DefinedAtom *defAtom = dyn_cast<DefinedAtom>(&atom)) {
|
if (auto *def = dyn_cast<DefinedAtom>(&atom)) {
|
||||||
_definedAtoms._atoms.push_back(defAtom);
|
_definedAtoms._atoms.push_back(def);
|
||||||
} else if (const UndefinedAtom *undefAtom = dyn_cast<UndefinedAtom>(&atom)) {
|
} else if (auto *undef = dyn_cast<UndefinedAtom>(&atom)) {
|
||||||
_undefinedAtoms._atoms.push_back(undefAtom);
|
_undefinedAtoms._atoms.push_back(undef);
|
||||||
} else if (const SharedLibraryAtom *slAtom =
|
} else if (auto *shared = dyn_cast<SharedLibraryAtom>(&atom)) {
|
||||||
dyn_cast<SharedLibraryAtom>(&atom)) {
|
_sharedLibraryAtoms._atoms.push_back(shared);
|
||||||
_sharedLibraryAtoms._atoms.push_back(slAtom);
|
} else if (auto *abs = dyn_cast<AbsoluteAtom>(&atom)) {
|
||||||
} else if (const AbsoluteAtom *abAtom = dyn_cast<AbsoluteAtom>(&atom)) {
|
_absoluteAtoms._atoms.push_back(abs);
|
||||||
_absoluteAtoms._atoms.push_back(abAtom);
|
|
||||||
} else {
|
} else {
|
||||||
llvm_unreachable("atom has unknown definition kind");
|
llvm_unreachable("atom has unknown definition kind");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue