mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2026-07-19 15:13:37 -04:00
uselistorder: Pull the bit through WriteToBitcodFile()
Change the callers of `WriteToBitcodeFile()` to pass `true` or `shouldPreserveBitcodeUseListOrder()` explicitly. I left the callers that want to send `false` alone. I'll keep pushing the bit higher until hopefully I can delete the global `cl::opt` entirely. llvm-svn: 234957
This commit is contained in:
@@ -15,11 +15,12 @@
|
||||
#include "llvm/Bitcode/ReaderWriter.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/IR/UseListOrder.h"
|
||||
#include "llvm/Pass.h"
|
||||
using namespace llvm;
|
||||
|
||||
PreservedAnalyses BitcodeWriterPass::run(Module &M) {
|
||||
WriteBitcodeToFile(&M, OS);
|
||||
WriteBitcodeToFile(&M, OS, shouldPreserveBitcodeUseListOrder());
|
||||
return PreservedAnalyses::all();
|
||||
}
|
||||
|
||||
@@ -34,7 +35,7 @@ namespace {
|
||||
const char *getPassName() const override { return "Bitcode Writer"; }
|
||||
|
||||
bool runOnModule(Module &M) override {
|
||||
WriteBitcodeToFile(&M, OS);
|
||||
WriteBitcodeToFile(&M, OS, shouldPreserveBitcodeUseListOrder());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user