diff options
Diffstat (limited to 'llvm/tools/bugpoint/CrashDebugger.cpp')
| -rw-r--r-- | llvm/tools/bugpoint/CrashDebugger.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/tools/bugpoint/CrashDebugger.cpp b/llvm/tools/bugpoint/CrashDebugger.cpp index 167b6a2ffc0..aa88a06a6df 100644 --- a/llvm/tools/bugpoint/CrashDebugger.cpp +++ b/llvm/tools/bugpoint/CrashDebugger.cpp @@ -364,6 +364,11 @@ bool ReduceCrashingFunctionAttributes::TestFuncAttrs( // Set this new list of attributes on the function. F->setAttributes(NewAttrs); + // If the attribute list includes "optnone" we need to make sure it also + // includes "noinline" otherwise we will get a verifier failure. + if (F->hasFnAttribute(Attribute::OptimizeNone)) + F->addFnAttr(Attribute::NoInline); + // Try running on the hacked up program... if (TestFn(BD, M.get())) { BD.setNewProgram(std::move(M)); // It crashed, keep the trimmed version... |

