Try to fix a layering violation introduced by r213945

The dragonegg buildbot (and others?) started failing after
r213945/r213946 because `llvm-as` wasn't linking in the bitcode reader.
I think moving the verify functions to the same file as the verify pass
should fix the build.  Adding a command-line option for maintaining
use-list order in assembly as a drive-by to prevent warnings about
unused static functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213947 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-07-25 15:41:49 +00:00
parent d8d3b4dc61
commit deb8e30913
3 changed files with 321 additions and 313 deletions

View File

@@ -15,28 +15,21 @@
#ifndef LLVM_IR_USELISTORDER_H
#define LLVM_IR_USELISTORDER_H
#include "llvm/ADT/ArrayRef.h"
namespace llvm {
class Module;
/// \brief Whether to preserve use-list ordering.
bool shouldPreserveBitcodeUseListOrder();
bool shouldPreserveAssemblyUseListOrder();
/// \brief Shuffle all use-lists in a module.
///
/// Adds \c SeedOffset to the default seed for the random number generator.
void shuffleUseLists(Module &M, unsigned SeedOffset = 0);
/// \brief Verify use-list order after serializing to bitcode.
///
/// \return \c true if there are no errors.
bool verifyBitcodeUseListOrder(const Module &M);
/// \brief Verify use-list order after serializing to assembly.
///
/// \return \c true if there are no errors.
bool verifyAssemblyUseListOrder(const Module &M);
} // end namespace llvm
#endif