diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-06 16:29:50 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-06 16:29:50 +0000 |
commit | a9f3a5cb376d4cf9d1148ddef8805646ead90066 (patch) | |
tree | 671a986bedc6f2928d8aa2c74ac0870568fddfd6 /llvm/tools | |
parent | b340f0117c8093d0e06cf640765c3f7b592a0f78 (diff) | |
download | bcm5719-llvm-a9f3a5cb376d4cf9d1148ddef8805646ead90066.tar.gz bcm5719-llvm-a9f3a5cb376d4cf9d1148ddef8805646ead90066.zip |
Have the SubtargetFeature help routine just not return a number and
fall back to the normal path without a cpu. While doing this fix
llc to just exit when we don't have a module to process instead of
asserting.
llvm-svn: 208102
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/llc/llc.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/tools/llc/llc.cpp b/llvm/tools/llc/llc.cpp index 654a9c3eeea..712817d9347 100644 --- a/llvm/tools/llc/llc.cpp +++ b/llvm/tools/llc/llc.cpp @@ -277,7 +277,14 @@ static int compileModule(char **argv, LLVMContext &Context) { TheTarget->createTargetMachine(TheTriple.getTriple(), MCPU, FeaturesStr, Options, RelocModel, CMModel, OLvl)); assert(target.get() && "Could not allocate target machine!"); - assert(mod && "Should have exited after outputting help!"); + + // If we don't have a module then just exit now. We do this down + // here since the CPU/Feature help is underneath the target machine + // creation. + if (SkipModule) + return 0; + + assert(mod && "Should have exited if we didn't have a module!"); TargetMachine &Target = *target.get(); if (EnableDwarfDirectory) |