Created
March 16, 2012 22:10
-
-
Save jgouly/2053153 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | |
index 52ba489..4d8864e 100644 | |
--- a/lib/Driver/Tools.cpp | |
+++ b/lib/Driver/Tools.cpp | |
@@ -1321,15 +1321,18 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, | |
// The make clang go fast button. | |
CmdArgs.push_back("-disable-free"); | |
+ const char *InputFilename = darwin::CC1::getBaseInputName(Args, Inputs); | |
// Disable the verification pass in -asserts builds. | |
#ifdef NDEBUG | |
- CmdArgs.push_back("-disable-llvm-verifier"); | |
+ StringRef IFN(InputFilename); | |
+ if(!IFN.endswith(".ll")) | |
+ CmdArgs.push_back("-disable-llvm-verifier"); | |
#endif | |
// Set the main file name, so that debug info works even with | |
// -save-temps. | |
CmdArgs.push_back("-main-file-name"); | |
- CmdArgs.push_back(darwin::CC1::getBaseInputName(Args, Inputs)); | |
+ CmdArgs.push_back(InputFilename); | |
// Some flags which affect the language (via preprocessor | |
// defines). See darwin::CC1::AddCPPArgs. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment