[clang] 6782417 - [RISCV] Don't emit #undef BUILTIN from RISCVVEmitter.cpp
Jim Lin via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 15 23:56:59 PDT 2021
Author: Jim Lin
Date: 2021-03-16T14:57:45+08:00
New Revision: 678241795c957b18bc473045e48abe3f2a61ff5c
URL: https://github.com/llvm/llvm-project/commit/678241795c957b18bc473045e48abe3f2a61ff5c
DIFF: https://github.com/llvm/llvm-project/commit/678241795c957b18bc473045e48abe3f2a61ff5c.diff
LOG: [RISCV] Don't emit #undef BUILTIN from RISCVVEmitter.cpp
In BuiltinsRISCV.def, other extension 's intrinsics need to be defined by using macro BUILTIN.
So, it shouldn't undefine macro BUILTIN in the end of declaration for V intrinsics.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D98682
Added:
Modified:
clang/include/clang/Basic/BuiltinsRISCV.def
clang/utils/TableGen/RISCVVEmitter.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Basic/BuiltinsRISCV.def b/clang/include/clang/Basic/BuiltinsRISCV.def
index e76c853787c9..c91b3d1b1f5c 100644
--- a/clang/include/clang/Basic/BuiltinsRISCV.def
+++ b/clang/include/clang/Basic/BuiltinsRISCV.def
@@ -17,3 +17,5 @@
#include "clang/Basic/riscv_vector_builtins.inc"
+#undef BUILTIN
+#undef TARGET_BUILTIN
diff --git a/clang/utils/TableGen/RISCVVEmitter.cpp b/clang/utils/TableGen/RISCVVEmitter.cpp
index ba96396c780d..f2b555a8b05c 100644
--- a/clang/utils/TableGen/RISCVVEmitter.cpp
+++ b/clang/utils/TableGen/RISCVVEmitter.cpp
@@ -881,7 +881,6 @@ void RVVEmitter::createBuiltins(raw_ostream &OS) {
else
OS << "\"\")\n";
}
- OS << "\n#undef BUILTIN\n";
OS << "#undef RISCVV_BUILTIN\n";
}
More information about the cfe-commits
mailing list