|
@@ -19,6 +19,7 @@
|
|
|
#include "llvm/IR/IRPrintingPasses.h"
|
|
|
#include "llvm/IR/LLVMContext.h"
|
|
|
#include "llvm/IR/Module.h"
|
|
|
+#include "llvm/IR/UseListOrder.h"
|
|
|
#include "llvm/IRReader/IRReader.h"
|
|
|
#include "llvm/IR/LegacyPassManager.h"
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
@@ -97,6 +98,11 @@ int main(int argc, char **argv) {
|
|
|
|
|
|
LLVMContext &Context = getGlobalContext();
|
|
|
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
|
|
|
+
|
|
|
+ // Turn on -preserve-bc-uselistorder by default, but let the command-line
|
|
|
+ // override it.
|
|
|
+ setPreserveBitcodeUseListOrder(true);
|
|
|
+
|
|
|
cl::ParseCommandLineOptions(argc, argv, "llvm extractor\n");
|
|
|
|
|
|
// Use lazy loading, since we only care about selected global values.
|