2014-08-02 07:03:36 +08:00
|
|
|
//===- UseListOrder.cpp - Implement Use List Order ------------------------===//
|
2014-07-25 22:49:26 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2014-08-02 07:03:36 +08:00
|
|
|
// Implement structures and command-line options for preserving use-list order.
|
2014-07-25 22:49:26 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "llvm/IR/UseListOrder.h"
|
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
|
|
|
|
static cl::opt<bool> PreserveBitcodeUseListOrder(
|
|
|
|
"preserve-bc-use-list-order",
|
|
|
|
cl::desc("Experimental support to preserve bitcode use-list order."),
|
|
|
|
cl::init(false), cl::Hidden);
|
|
|
|
|
2014-07-25 23:41:49 +08:00
|
|
|
static cl::opt<bool> PreserveAssemblyUseListOrder(
|
|
|
|
"preserve-ll-use-list-order",
|
|
|
|
cl::desc("Experimental support to preserve assembly use-list order."),
|
|
|
|
cl::init(false), cl::Hidden);
|
|
|
|
|
2014-07-25 22:49:26 +08:00
|
|
|
bool llvm::shouldPreserveBitcodeUseListOrder() {
|
|
|
|
return PreserveBitcodeUseListOrder;
|
|
|
|
}
|
|
|
|
|
2014-07-25 23:41:49 +08:00
|
|
|
bool llvm::shouldPreserveAssemblyUseListOrder() {
|
|
|
|
return PreserveAssemblyUseListOrder;
|
|
|
|
}
|
2014-08-20 05:08:27 +08:00
|
|
|
|
|
|
|
void llvm::setPreserveBitcodeUseListOrder(bool ShouldPreserve) {
|
|
|
|
PreserveBitcodeUseListOrder = ShouldPreserve;
|
|
|
|
}
|
|
|
|
|
|
|
|
void llvm::setPreserveAssemblyUseListOrder(bool ShouldPreserve) {
|
|
|
|
PreserveAssemblyUseListOrder = ShouldPreserve;
|
|
|
|
}
|