summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/opt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r--llvm/tools/opt/opt.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp
index dc60f3cdf9b..28c1c2bc6c5 100644
--- a/llvm/tools/opt/opt.cpp
+++ b/llvm/tools/opt/opt.cpp
@@ -196,6 +196,11 @@ static cl::opt<bool>
cl::desc("Run all passes twice, re-using the same pass manager."),
cl::init(false), cl::Hidden);
+static cl::opt<bool> DiscardValueNames(
+ "discard-value-names",
+ cl::desc("Discard names from Value (other than GlobalValue)."),
+ cl::init(false), cl::Hidden);
+
static inline void addPass(legacy::PassManagerBase &PM, Pass *P) {
// Add the pass to the pass manager...
PM.add(P);
@@ -346,6 +351,8 @@ int main(int argc, char **argv) {
SMDiagnostic Err;
+ Context.setDiscardValueNames(DiscardValueNames);
+
// Load the input module...
std::unique_ptr<Module> M = parseIRFile(InputFilename, Err, Context);
OpenPOWER on IntegriCloud