summaryrefslogtreecommitdiff
path: root/utils/TableGen
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2010-09-24 19:48:47 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2010-09-24 19:48:47 +0000
commit1f4096054367cab3acab3a74c719ef6d3090606a (patch)
treedd1bcb1e64ba77b8f22f3bf22aaccc0b9dd55ed2 /utils/TableGen
parent4b794c9a9990fdea831966c7ebd3be46efe261a1 (diff)
downloadllvm-1f4096054367cab3acab3a74c719ef6d3090606a.tar.gz
llvm-1f4096054367cab3acab3a74c719ef6d3090606a.tar.bz2
llvm-1f4096054367cab3acab3a74c719ef6d3090606a.tar.xz
Get rid of pop_macro warnings on MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114750 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/IntrinsicEmitter.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp
index c2aabf7116..69ac21275c 100644
--- a/utils/TableGen/IntrinsicEmitter.cpp
+++ b/utils/TableGen/IntrinsicEmitter.cpp
@@ -68,16 +68,19 @@ void IntrinsicEmitter::run(raw_ostream &OS) {
void IntrinsicEmitter::EmitPrefix(raw_ostream &OS) {
OS << "// VisualStudio defines setjmp as _setjmp\n"
- "#if defined(_MSC_VER) && defined(setjmp)\n"
+ "#if defined(_MSC_VER) && defined(setjmp) && \\\n"
+ " !defined(setjmp_undefined_for_msvc)\n"
"# pragma push_macro(\"setjmp\")\n"
"# undef setjmp\n"
+ "# define setjmp_undefined_for_msvc\n"
"#endif\n\n";
}
void IntrinsicEmitter::EmitSuffix(raw_ostream &OS) {
- OS << "#if defined(_MSC_VER)\n"
+ OS << "#if defined(_MSC_VER) && defined(setjmp_undefined_for_msvc)\n"
"// let's return it to _setjmp state\n"
"# pragma pop_macro(\"setjmp\")\n"
+ "# undef setjmp_undefined_for_msvc\n"
"#endif\n\n";
}