Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
[oota-llvm.git] / tools / llvm-nm / llvm-nm.cpp
index eef9a66cc373a55e2bd5b124ce9a623bbe3b738d..2baf5323f4cb03815f582be05485d8a299828528 100644 (file)
@@ -88,7 +88,8 @@ static char TypeCharForSymbol(GlobalValue &GV) {
 
 static void DumpSymbolNameForGlobalValue(GlobalValue &GV) {
   // Private linkage and available_externally linkage don't exist in symtab.
-  if (GV.hasPrivateLinkage() || GV.hasAvailableExternallyLinkage()) return;
+  if (GV.hasPrivateLinkage() || GV.hasLinkerPrivateLinkage() ||
+      GV.hasAvailableExternallyLinkage()) return;
   
   const std::string SymbolAddrStr = "        "; // Not used yet...
   char TypeChar = TypeCharForSymbol(GV);
@@ -144,12 +145,11 @@ static void DumpSymbolNamesFromFile(std::string &Filename) {
     if (Buffer.get())
       Result = ParseBitcodeFile(Buffer.get(), Context, &ErrorMessage);
     
-    if (Result)
+    if (Result) {
       DumpSymbolNamesFromModule(Result);
-    else {
+      delete Result;
+    } else
       errs() << ToolName << ": " << Filename << ": " << ErrorMessage << "\n";
-      return;
-    }
     
   } else if (aPath.isArchive()) {
     std::string ErrMsg;