diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-04-26 02:24:10 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-04-26 02:24:10 +0000 |
| commit | d2747054b400911677bba7d472a7e4bcf069c5b0 (patch) | |
| tree | 5af939e16201fe0ec018d3aaf964c15cbbf98c35 /llvm/lib | |
| parent | 43a17fe826ef290420affa25ce5d0663fb64ae3f (diff) | |
| download | bcm5719-llvm-d2747054b400911677bba7d472a7e4bcf069c5b0.tar.gz bcm5719-llvm-d2747054b400911677bba7d472a7e4bcf069c5b0.zip | |
print aliases before functions
llvm-svn: 36459
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index ec9a5539b9f..8834e1e2a22 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -848,15 +848,16 @@ void AssemblyWriter::printModule(const Module *M) { for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I) printGlobal(I); + + // Output all aliases. + if (!M->alias_empty()) Out << "\n"; + for (Module::const_alias_iterator I = M->alias_begin(), E = M->alias_end(); + I != E; ++I) + printAlias(I); // Output all of the functions. for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) printFunction(I); - - // Output all aliases - for (Module::const_alias_iterator I = M->alias_begin(), E = M->alias_end(); - I != E; ++I) - printAlias(I); } void AssemblyWriter::printGlobal(const GlobalVariable *GV) { |

