diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-30 06:15:20 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2008-05-30 06:15:20 +0000 |
commit | 9e58d5958fa7a42e385c5c68d6664fde555d036c (patch) | |
tree | 26bd593b8f8737fb3247287a86fbfe950380e678 /llvm/utils | |
parent | 490692c1d167536c401e9e0282d661cc99646421 (diff) | |
download | bcm5719-llvm-9e58d5958fa7a42e385c5c68d6664fde555d036c.tar.gz bcm5719-llvm-9e58d5958fa7a42e385c5c68d6664fde555d036c.zip |
Do not generate empty 'if's for the output_suffix property.
llvm-svn: 51737
Diffstat (limited to 'llvm/utils')
-rw-r--r-- | llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp index 93fe90b1ee8..a29492817d2 100644 --- a/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/llvm/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -790,12 +790,20 @@ void EmitForwardOptionPropertyHandlingCode (const ToolOptionDescription& D, } } -// A helper function used by EmitOptionPropertyHandlingCode() that -// tells us whether we should emit any code at all. +// ToolOptionHasInterestingProperties - A helper function used by +// EmitOptionPropertyHandlingCode() that tells us whether we should +// emit any property handling code at all. bool ToolOptionHasInterestingProperties(const ToolOptionDescription& D) { - if (!D.isForward() && !D.isUnpackValues() && D.Props.empty()) - return false; - return true; + bool ret = false; + for (OptionPropertyList::const_iterator B = D.Props.begin(), + E = D.Props.end(); B != E; ++B) { + const OptionProperty& OptProp = *B; + if (OptProp.first == OptionPropertyType::AppendCmd) + ret = true; + } + if (D.isForward() || D.isUnpackValues()) + ret = true; + return ret; } /// EmitOptionPropertyHandlingCode - Helper function used by |