Skip to content

Commit

Permalink
IR: Rename 'use-list-order' options to 'uselistorder'
Browse files Browse the repository at this point in the history
Rename options to be consistent with the name of `verify-uselistorder`,
and update `DEBUG_TYPE` (etc.) to be consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234919 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dexonsmith committed Apr 14, 2015
1 parent 9074dc7 commit 8922be3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions lib/IR/UseListOrder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
using namespace llvm;

static cl::opt<bool> PreserveBitcodeUseListOrder(
"preserve-bc-use-list-order",
"preserve-bc-uselistorder",
cl::desc("Preserve use-list order when writing LLVM bitcode."),
cl::init(true), cl::Hidden);

static cl::opt<bool> PreserveAssemblyUseListOrder(
"preserve-ll-use-list-order",
"preserve-ll-uselistorder",
cl::desc("Preserve use-list order when writing LLVM assembly."),
cl::init(false), cl::Hidden);

Expand Down
16 changes: 8 additions & 8 deletions tools/verify-uselistorder/verify-uselistorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

using namespace llvm;

#define DEBUG_TYPE "use-list-order"
#define DEBUG_TYPE "uselistorder"

static cl::opt<std::string> InputFilename(cl::Positional,
cl::desc("<input bitcode file>"),
Expand Down Expand Up @@ -109,7 +109,7 @@ struct ValueMapping {
bool TempFile::init(const std::string &Ext) {
SmallVector<char, 64> Vector;
DEBUG(dbgs() << " - create-temp-file\n");
if (auto EC = sys::fs::createTemporaryFile("use-list-order", Ext, Vector)) {
if (auto EC = sys::fs::createTemporaryFile("uselistorder", Ext, Vector)) {
(void)EC;
DEBUG(dbgs() << "error: " << EC.message() << "\n");
return true;
Expand Down Expand Up @@ -172,7 +172,7 @@ std::unique_ptr<Module> TempFile::readAssembly(LLVMContext &Context) const {
SMDiagnostic Err;
std::unique_ptr<Module> M = parseAssemblyFile(Filename, Err, Context);
if (!M.get())
DEBUG(dbgs() << "error: "; Err.print("verify-use-list-order", dbgs()));
DEBUG(dbgs() << "error: "; Err.print("verify-uselistorder", dbgs()));
return M;
}

Expand Down Expand Up @@ -343,7 +343,7 @@ static void verifyAfterRoundTrip(const Module &M,
report_fatal_error("use-list order changed");
}
static void verifyBitcodeUseListOrder(const Module &M) {
errs() << "*** verify-use-list-order: bitcode ***\n";
errs() << "*** verify-uselistorder: bitcode ***\n";
TempFile F;
if (F.init("bc"))
report_fatal_error("failed to initialize bitcode file");
Expand All @@ -356,7 +356,7 @@ static void verifyBitcodeUseListOrder(const Module &M) {
}

static void verifyAssemblyUseListOrder(const Module &M) {
errs() << "*** verify-use-list-order: assembly ***\n";
errs() << "*** verify-uselistorder: assembly ***\n";
TempFile F;
if (F.init("ll"))
report_fatal_error("failed to initialize assembly file");
Expand Down Expand Up @@ -540,14 +540,14 @@ int main(int argc, char **argv) {
return 1;
}

errs() << "*** verify-use-list-order ***\n";
errs() << "*** verify-uselistorder ***\n";
// Can't verify if order isn't preserved.
if (!shouldPreserveBitcodeUseListOrder()) {
errs() << "warning: forcing -preserve-bc-use-list-order\n";
errs() << "warning: forcing -preserve-bc-uselistorder\n";
setPreserveBitcodeUseListOrder(true);
}
if (!shouldPreserveAssemblyUseListOrder()) {
errs() << "warning: forcing -preserve-ll-use-list-order\n";
errs() << "warning: forcing -preserve-ll-uselistorder\n";
setPreserveAssemblyUseListOrder(true);
}

Expand Down

0 comments on commit 8922be3

Please sign in to comment.