From 6a088b2ce58a540d869601e0ebcfe5f0592c05ba Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 4 Dec 2018 12:31:52 +0000 Subject: [PATCH] Fix MSVC "unknown pragma" warning. NFCI. llvm-svn: 348256 --- llvm/lib/Target/Hexagon/HexagonDepDecoders.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/lib/Target/Hexagon/HexagonDepDecoders.h b/llvm/lib/Target/Hexagon/HexagonDepDecoders.h index 5a40074..9f78412 100644 --- a/llvm/lib/Target/Hexagon/HexagonDepDecoders.h +++ b/llvm/lib/Target/Hexagon/HexagonDepDecoders.h @@ -11,8 +11,10 @@ // clang-format off +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-function" +#endif static DecodeStatus s4_0ImmDecoder(MCInst &MI, unsigned tmp, uint64_t, const void *Decoder) { @@ -69,5 +71,9 @@ static DecodeStatus s4_2ImmDecoder(MCInst &MI, unsigned tmp, signedDecoder<6>(MI, tmp, Decoder); return MCDisassembler::Success; } + +#if defined(__clang__) #pragma clang diagnostic pop +#endif + // clang-format on -- 2.7.4