aboutsummaryrefslogtreecommitdiffstats
path: root/tools/llvm-as
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-18 20:47:13 +0000
committerChris Lattner <sabre@nondot.org>2003-08-18 20:47:13 +0000
commit04aa29d7bf97f6fd73883df7fa5127510c9cc40b (patch)
tree8603c6383dfc1aea602c4b0afeb3e7f9bff9e1c7 /tools/llvm-as
parentb2d11814f92a9b5c1394266e3ebe18139d3bf2ed (diff)
downloadexternal_llvm-04aa29d7bf97f6fd73883df7fa5127510c9cc40b.zip
external_llvm-04aa29d7bf97f6fd73883df7fa5127510c9cc40b.tar.gz
external_llvm-04aa29d7bf97f6fd73883df7fa5127510c9cc40b.tar.bz2
Add new -disable-verify option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7960 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-as')
-rw-r--r--tools/llvm-as/as.cpp7
-rw-r--r--tools/llvm-as/llvm-as.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/tools/llvm-as/as.cpp b/tools/llvm-as/as.cpp
index 5860542..4ca59b9 100644
--- a/tools/llvm-as/as.cpp
+++ b/tools/llvm-as/as.cpp
@@ -31,6 +31,10 @@ Force("f", cl::desc("Overwrite output files"));
static cl::opt<bool>
DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
+static cl::opt<bool>
+DisableVerify("disable-verify", cl::Hidden,
+ cl::desc("Do not run verifier on input LLVM (dangerous!"));
+
int main(int argc, char **argv) {
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
@@ -43,12 +47,11 @@ int main(int argc, char **argv) {
return 1;
}
- if (verifyModule(*M.get())) {
+ if (!DisableVerify && verifyModule(*M.get())) {
std::cerr << argv[0]
<< ": assembly parsed, but does not verify as correct!\n";
return 1;
}
-
if (DumpAsm) std::cerr << "Here's the assembly:\n" << M.get();
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index 5860542..4ca59b9 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/tools/llvm-as/llvm-as.cpp
@@ -31,6 +31,10 @@ Force("f", cl::desc("Overwrite output files"));
static cl::opt<bool>
DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
+static cl::opt<bool>
+DisableVerify("disable-verify", cl::Hidden,
+ cl::desc("Do not run verifier on input LLVM (dangerous!"));
+
int main(int argc, char **argv) {
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
@@ -43,12 +47,11 @@ int main(int argc, char **argv) {
return 1;
}
- if (verifyModule(*M.get())) {
+ if (!DisableVerify && verifyModule(*M.get())) {
std::cerr << argv[0]
<< ": assembly parsed, but does not verify as correct!\n";
return 1;
}
-
if (DumpAsm) std::cerr << "Here's the assembly:\n" << M.get();