Skip to content

Instantly share code, notes, and snippets.

@jgouly
Created March 16, 2012 22:25
Show Gist options
  • Save jgouly/2053275 to your computer and use it in GitHub Desktop.
Save jgouly/2053275 to your computer and use it in GitHub Desktop.
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 52ba489..9ebee04 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1323,7 +1323,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// Disable the verification pass in -asserts builds.
#ifdef NDEBUG
- CmdArgs.push_back("-disable-llvm-verifier");
+ types::ID MainFileType = Inputs[0].getType();
+ if (MainFileType != types::TY_LLVM_IR || MainFileType != types::TY_LLVM_BC)
+ CmdArgs.push_back("-disable-llvm-verifier");
#endif
// Set the main file name, so that debug info works even with
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment