diff options
| author | Duncan Sands <baldrick@free.fr> | 2012-09-12 09:55:51 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2012-09-12 09:55:51 +0000 |
| commit | 66fc0e63a0fc2b79fe968c0aaccbcde5518798f7 (patch) | |
| tree | 2d2c07480d9b2031f44d1d40209cd1f7625ab28e /llvm/lib | |
| parent | a81d268acd5f0426c18d98dce4f20add489572a0 (diff) | |
| download | bcm5719-llvm-66fc0e63a0fc2b79fe968c0aaccbcde5518798f7.tar.gz bcm5719-llvm-66fc0e63a0fc2b79fe968c0aaccbcde5518798f7.zip | |
When calling print directly on a global (eg from the debugger) it
was printing a newline that doesn't occur when printing other kinds
of LLVM values. Move the printing of that newline elsewhere, making
globals print the same as other values while leaving the output when
printing an entire module unchanged. Patch by Saša Tomić.
llvm-svn: 163693
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index f3f24ae5c8b..f2945ac88ff 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -1288,8 +1288,9 @@ void AssemblyWriter::printModule(const Module *M) { // Output all globals. if (!M->global_empty()) Out << '\n'; for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); - I != E; ++I) - printGlobal(I); + I != E; ++I) { + printGlobal(I); Out << '\n'; + } // Output all aliases. if (!M->alias_empty()) Out << "\n"; @@ -1439,7 +1440,6 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) { Out << ", align " << GV->getAlignment(); printInfoComment(*GV); - Out << '\n'; } void AssemblyWriter::printAlias(const GlobalAlias *GA) { |

