[GlobalOpt] Make sure all debug lines end with '\n'
authorJames Molloy <james.molloy@arm.com>
Fri, 13 Nov 2015 11:05:13 +0000 (11:05 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 13 Nov 2015 11:05:13 +0000 (11:05 +0000)
GlobalVariable::print() used to emit a newline. It hasn't for a while now, but these debug lines weren't updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253030 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/GlobalOpt.cpp

index 73b8b5d5924ad47dbcbf51a9bcfd6107315f4f41..7bd0d70198361d47113a779a76f91b2247d23cd9 100644 (file)
@@ -1738,7 +1738,7 @@ bool GlobalOpt::ProcessInternalGlobal(GlobalVariable *GV,
       GS.AccessingFunction->getName() == "main" &&
       GS.AccessingFunction->hasExternalLinkage() &&
       GV->getType()->getAddressSpace() == 0) {
-    DEBUG(dbgs() << "LOCALIZING GLOBAL: " << *GV);
+    DEBUG(dbgs() << "LOCALIZING GLOBAL: " << *GV << "\n");
     Instruction &FirstI = const_cast<Instruction&>(*GS.AccessingFunction
                                                    ->getEntryBlock().begin());
     Type *ElemTy = GV->getType()->getElementType();
@@ -1757,7 +1757,7 @@ bool GlobalOpt::ProcessInternalGlobal(GlobalVariable *GV,
   // If the global is never loaded (but may be stored to), it is dead.
   // Delete it now.
   if (!GS.IsLoaded) {
-    DEBUG(dbgs() << "GLOBAL NEVER LOADED: " << *GV);
+    DEBUG(dbgs() << "GLOBAL NEVER LOADED: " << *GV << "\n");
 
     bool Changed;
     if (isLeakCheckerRoot(GV)) {