Index: src/llvm2ice.cpp |
diff --git a/src/llvm2ice.cpp b/src/llvm2ice.cpp |
index 4dd24449766f6e873cd0148537ba182917f559cf..12c241a8b7a2c180fa1c759b41c2d83915ec406a 100644 |
--- a/src/llvm2ice.cpp |
+++ b/src/llvm2ice.cpp |
@@ -284,6 +284,13 @@ int main(int argc, char **argv) { |
Flags.TranslateOnly = TranslateOnly; |
Flags.DisableIRGeneration = DisableIRGeneration; |
+ // Force -build-on-read=0 for .ll files. |
+ const std::string LLSuffix = ".ll"; |
+ if (IRFilename.length() >= LLSuffix.length() && |
+ IRFilename.compare(IRFilename.length() - LLSuffix.length(), |
+ LLSuffix.length(), LLSuffix) == 0) |
+ BuildOnRead = false; |
+ |
Ice::GlobalContext Ctx(Ls, Os, VMask, TargetArch, OptLevel, TestPrefix, |
Flags); |