mirror of https://github.com/llvm/torch-mlir
Properly guard clang-specific pragma.
Avoids unsupported pragma warning on GCC.pull/2441/head
parent
29fdc3833c
commit
fcb3b718a5
|
@ -17,7 +17,7 @@
|
|||
using namespace mlir;
|
||||
|
||||
StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
|
||||
#ifndef _MSC_VER
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverlength-strings"
|
||||
#endif
|
||||
|
@ -10984,7 +10984,7 @@ StringRef mlir::torch::Torch::getAbstractInterpLibrary() {
|
|||
"}\n"
|
||||
"";
|
||||
// clang-format on
|
||||
#ifndef _MSC_VER
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -3563,14 +3563,14 @@ f"""//===-------------------------------------------------------------*- C++-*-=
|
|||
using namespace mlir;
|
||||
|
||||
StringRef mlir::torch::Torch::getAbstractInterpLibrary() {{
|
||||
#ifndef _MSC_VER
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Woverlength-strings"
|
||||
#endif
|
||||
// clang-format off
|
||||
return {asm};
|
||||
// clang-format on
|
||||
#ifndef _MSC_VER
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
}}""")
|
||||
|
|
Loading…
Reference in New Issue