diff options
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 337aaf23fd0..6e0bdd24a75 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -60,7 +60,10 @@ llvm::Constant *CodeGenModule::getTerminateFn() { name = "_ZSt9terminatev"; } else if (getLangOpts().CPlusPlus && getTarget().getCXXABI().isMicrosoft()) { - name = "\01?terminate@@YAXXZ"; + if (getLangOpts().isCompatibleWithMSVC(19)) + name = "__std_terminate"; + else + name = "\01?terminate@@YAXXZ"; } else if (getLangOpts().ObjC1 && getLangOpts().ObjCRuntime.hasTerminate()) name = "objc_terminate"; |