aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-04-05 18:56:55 +0000
committerAndrew Trick <atrick@apple.com>2011-04-05 18:56:55 +0000
commit92b5d947e262bcc9afe6ddee6caf66151bd7c572 (patch)
tree1832c6d7b2b5c9279f70e62a5b02634658b2588d /lib/CodeGen/BackendUtil.cpp
parent6445d6278b8c324eb45be59fc9a10992a65252bf (diff)
Added *hidden* flags -print-options and -print-all-options so
developers can see if their driver changed any cl::Option's. The current implementation isn't perfect but handles most kinds of options. This is nice to have when decomposing the stages of compilation and moving between different drivers. It's also a good sanity check when comparing results produced by different command line invocations that are expected to produce the comparable results. Note: This is not an attempt to prolong the life of cl::Option. On the contrary, it's a placeholder for a feature that must exist when cl::Option is replaced by a more appropriate framework. A new framework needs: a central option registry, dynamic name lookup, non-global containers of option values (e.g. per-module, per-function), *and* the ability to print options values and their defaults at any point during compilation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/BackendUtil.cpp')
-rw-r--r--lib/CodeGen/BackendUtil.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 77626746e9..f3d79cb1e0 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -323,6 +323,9 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, raw_ostream *OS) {
return;
}
+ // Before executing passes, print the final values of the LLVM options.
+ cl::PrintOptionValues();
+
// Run passes. For now we do all passes at once, but eventually we
// would like to have the option of streaming code generation.