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 | 79da6ef84ff0caae6ae904840ec5bc975b6de4e7 (patch) | |
tree | b2bd71519ee0bf9e12a229c6dfa69b17416a8633 | |
parent | dba5de5246f84fe50aef79e464e5aecdf5607ab4 (diff) | |
download | external_llvm-79da6ef84ff0caae6ae904840ec5bc975b6de4e7.zip external_llvm-79da6ef84ff0caae6ae904840ec5bc975b6de4e7.tar.gz external_llvm-79da6ef84ff0caae6ae904840ec5bc975b6de4e7.tar.bz2 |
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ć.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163693 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index f3f24ae..f2945ac 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/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) { |