diff options
| author | Daniel Sanders <daniel_l_sanders@apple.com> | 2016-11-19 14:47:41 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2016-11-19 14:47:41 +0000 |
| commit | c95590bc45ba7b944fd64828ad06367e4fc4b884 (patch) | |
| tree | 8f3f7302de3147391201e9a78d918ffd05c6ba8e /llvm/utils | |
| parent | c6d1986a8443844714c78461ff32655b6602a875 (diff) | |
| download | bcm5719-llvm-c95590bc45ba7b944fd64828ad06367e4fc4b884.tar.gz bcm5719-llvm-c95590bc45ba7b944fd64828ad06367e4fc4b884.zip | |
Try again to fix unused variable warning on lld-x86_64-darwin13 after r287439.
The previous attempt didn't work. I assume LLVM_ATTRIBUTE_UNUSED isn't
available on that machine.
llvm-svn: 287442
Diffstat (limited to 'llvm/utils')
| -rw-r--r-- | llvm/utils/TableGen/CodeEmitterGen.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeEmitterGen.cpp b/llvm/utils/TableGen/CodeEmitterGen.cpp index ef44757b7d4..9bcdebd9548 100644 --- a/llvm/utils/TableGen/CodeEmitterGen.cpp +++ b/llvm/utils/TableGen/CodeEmitterGen.cpp @@ -356,7 +356,8 @@ void CodeEmitterGen::run(raw_ostream &o) { << " RequiredFeatures[Inst.getOpcode()];\n" << " if (MissingFeatures) {\n" << " std::ostringstream Msg;\n" - << " Msg << \"Attempting to emit \" << MCII.getName(Inst.getOpcode()).str()\n" + << " Msg << \"Attempting to emit \" << " + "MCII.getName(Inst.getOpcode()).str()\n" << " << \" instruction but the \";\n" << " for (unsigned i = 0; i < 8 * sizeof(MissingFeatures); ++i)\n" << " if (MissingFeatures & (1ULL << i))\n" @@ -364,6 +365,10 @@ void CodeEmitterGen::run(raw_ostream &o) { << " Msg << \"predicate(s) are not met\";\n" << " report_fatal_error(Msg.str());\n" << " }\n" + << "#else\n" + << "// Silence unused variable warning on targets that don't use MCII for " + "other purposes (e.g. BPF).\n" + << "(void)MCII;\n" << "#endif // NDEBUG\n"; o << "}\n"; o << "#endif\n"; |

