diff options
author | Shih-wei Liao <sliao@google.com> | 2010-04-07 12:21:42 -0700 |
---|---|---|
committer | Shih-wei Liao <sliao@google.com> | 2010-04-07 12:21:42 -0700 |
commit | e4454320b3cfffe926a487c33fbeb454366de2f8 (patch) | |
tree | 133c05da684edf4a3b2529bcacfa996298c455f6 /tools/llc | |
parent | 20570085304f0a4ab4f112a01d77958bbd2827a1 (diff) | |
download | external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.zip external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.tar.gz external_llvm-e4454320b3cfffe926a487c33fbeb454366de2f8.tar.bz2 |
libbcc
Change-Id: Ieaa3ebd5a38f370752495549f8870b534eeedfc5
Diffstat (limited to 'tools/llc')
-rw-r--r-- | tools/llc/llc.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/llc/llc.cpp b/tools/llc/llc.cpp index fe34bd1..810ba42 100644 --- a/tools/llc/llc.cpp +++ b/tools/llc/llc.cpp @@ -305,6 +305,14 @@ int main(int argc, char **argv) { case '3': OLvl = CodeGenOpt::Aggressive; break; } + // Request that addPassesToEmitFile run the Verifier after running + // passes which modify the IR. +#ifndef NDEBUG + bool DisableVerify = false; +#else + bool DisableVerify = true; +#endif + // If this target requires addPassesToEmitWholeFile, do it now. This is // used by strange things like the C backend. if (Target.WantsWholeFile()) { @@ -320,7 +328,8 @@ int main(int argc, char **argv) { PM.add(createVerifierPass()); // Ask the target to add backend passes as necessary. - if (Target.addPassesToEmitWholeFile(PM, *Out, FileType, OLvl)) { + if (Target.addPassesToEmitWholeFile(PM, *Out, FileType, OLvl, + DisableVerify)) { errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; @@ -347,7 +356,8 @@ int main(int argc, char **argv) { // Override default to generate verbose assembly. Target.setAsmVerbosityDefault(true); - if (Target.addPassesToEmitFile(Passes, *Out, FileType, OLvl)) { + if (Target.addPassesToEmitFile(Passes, *Out, FileType, OLvl, + DisableVerify)) { errs() << argv[0] << ": target does not support generation of this" << " file type!\n"; if (Out != &fouts()) delete Out; |