forked from OSchip/llvm-project
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
This commit is contained in:
parent
a81d268acd
commit
66fc0e63a0
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue