Remove isOutputDynamic and use Out<ELFT>::DynSymTab instead.

This patch is to not instantiate DynSymTab and DynStrTab if the
output is not a dynamic output.

llvm-svn: 278095
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 0d60e65..57172ff 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -318,7 +318,7 @@
         Phdr.add(Out<ELFT>::Interp);
       break;
     case PT_DYNAMIC:
-      if (isOutputDynamic<ELFT>()) {
+      if (Out<ELFT>::DynSymTab) {
         Phdr.H.p_flags = Out<ELFT>::Dynamic->getPhdrFlags();
         Phdr.add(Out<ELFT>::Dynamic);
       }